<template>
	<view class="detail">
		<view class="detail-tabs">
			<u-tabs-swiper ref="uTabs" :list="ctrPermission == 1 ? tabs : tabContracts" :current="current"
				@change="tabsChange1" :is-scroll="false" swiperWidth="750"></u-tabs-swiper>
		</view>
		<view v-if="isPlay">
			<video :id="'video'+videoIdx" class="article-video_item" :src="vodSrc" :autoplay="autoplay"
				@fullscreenchange="fullscreenchange" v-show="isPlay" />
		</view>
		<view class="detail-contnet">
			<swiper class="detail-contnet_swiper" :vertical="isVertical" :current="swiperCurrent" duration="300"
				@transition="transition" @animationfinish="animationfinish" id="topicScroll">
				<swiper-item class="detail-contnet_swiper--item">
					<scroll-view scroll-y class="detail-contnet_swiper--scroll" style="height: 100%"
						@scrolltolower="getTopicList" :scroll-top="scrollTop" @scroll="scrollTest"
						@refresherrefresh="handleRefresher" refresher-enabled="true" :refresher-triggered="isTriggered">
						<template v-if="topics && JSON.parse(JSON.stringify(topics)).length > 0">
							<view class="search-header" v-if="current == 0" style="color: #006EFF;">
								<u-search :show-action="true" action-text="取消" height="64" shape="square"
									v-model="bbscontent" placeholder="请输入动态内容" @custom="bbsCancel" :focus="false"
									@focus="openList" @search="bbsSearch"></u-search>
							</view>
							<view v-show="BBShistorySearchDetail">
								<view class="history" v-if="searchHistoryList.length>=1">
									<view class="iconfont icon-lishi:before" style="width: 17rpx;display: inline;">
									</view>
									<text class="history_text">历史搜索</text>
									<view class="icon icon-shanchu" style="float: right;margin-right: 20rpx;"
										@click="BBSclearHistory()"></view>

									<view class="history_viewContent">
										<view class="history_view" v-for="(item,index) in BBSsearchHistoryList"
											:key="index" @click="BBSitemSearch(item)">
											{{item}}
										</view>
									</view>
								</view>
							</view>
							<view class="detail-contnet_comment" v-for="(item,index1) in topics" :key="item.Tid">
								<view class="detail-header" :id="step(item.Tid)">
									<view class="article-item" ref="article-item">
										<view class="article-header u-flex">
											<view class="article-header_avatar" @click.stop="go2User(item.AddAcc)">
												<u-image v-if="item.AddAccAvatar" width="85rpx" height="85rpx"
													border-radius="85rpx" :src="item.AddAccAvatar"></u-image>
												<u-image v-else width="85rpx" height="85rpx" border-radius="85rpx"
													src="/static/images/avatar.jpg"></u-image>
											</view>
											<view class="article-header_name u-flex-1">
												<view class="article-header_name--text"
													@click.stop="go2User(item.AddAcc)">{{ item.AddAccName }}</view>
												<view class="article-header_time">{{ item.AddTimeText }}</view>
											</view>
											<view class="mgr-30" @click="actDel(item.Tid)" v-if="item.IsAuthor == 1">
												<i class="icon icon-shanchu" style="font-size:30rpx"></i>
											</view>
											<view :class="['mgr-30',{'article-header_comment': item.IsGood == 1}]"
												@click.stop="actPraise(item.Tid,item.IsGood, index1)">
												<text class="icon icon icon-dianzan"></text>
												<text class="article-handle_item--text"
													v-if="item.Goods > 0">{{item.Goods}}</text>
											</view>
											<!-- 									<view class="mgr-30 article-header_comment" @click="showTransfer(item)">
												<text class="icon icon-zhuanfa"></text>
											</view> -->
											<view class="mgr-30 article-header_comment" @click="actComment(item.Tid)">
												<text class="icon icon-pinglun"></text>
											</view>
										</view>
										<view class="article-content">
											<view class="project-header_item current hidden"
												@click="$goPage('/repair/project',{project: item.Project, iid: prjItem.Iid})"
												v-if="JSON.parse(JSON.stringify(item.ProjectItem))!= null"
												v-for="prjItem in item.ProjectItem">
												{{prjItem.IndexNo}}{{' '}}{{prjItem.ItemName}}
											</view>
											<view class="project-header_item current hidden"
												@click="$goPage('/repair/project',{project: item.Project, iid: item.Item})"
												v-if="item.ItemName != ''">
												{{item.IndexNo}}{{' '}}{{item.ItemName}}
											</view>
											<!-- <rich-text class="rich-val" :nodes="item.Content"></rich-text> -->
											<u-parse :content="item.Content" :selectable="true"></u-parse>
										</view>
										<view class="article-video" v-if="item.VodSrc != ''"
											@click.stop="actVideoPlay(item.VodSrc)">
											<image class="article-video_img" mode="aspectFit" :src="item.VodImg">
											</image>
											<view class="article-video_play" v-if="!isPlay">
												<image class="article-video_play--icon"
													src="/static/images/home/play.png" mode="scaleToFill" />
											</view>
										</view>

										<view class="article-images" v-if="item.ImgPackJson!=''">
											<template v-for="(img, index) in item.ImgPackJson">
												<images-item :item="img" :index="index" :imgjson="item.ImgPackJson">
												</images-item>
											</template>
										</view>
										<view class="article-annex" v-if="item.AttPackJson != ''">
											<!-- <navigator :url="att.Src">
												<u-icon name="attach"></u-icon> {{att.Name}}
											</navigator> -->
											<template v-for="(item2,index2) in item.AttPackJson">
												<preview-pdf :item="item2" :index="index2"></preview-pdf>
											</template>
										</view>
										<view v-if="item.LikeStaffsText != ''" class="like-staffs">
											<u-icon name="heart" color="#515b7c" size="30" style="padding-left: 8rpx;">
											</u-icon>
											<text> {{' '}}{{item.LikeStaffsText}}</text>
										</view>
									</view>
								</view>
								<!--评论的界面显示开始-->
								<view class="detail-comment">
									<!--评论上方导航栏开始-->
									<view class="detail-comment_header u-flex u-row-between">
										<view class="comment-header_title u-flex">
											<image class="comment-header_title--icon"
												src="/static/images/home/icon-shequ.png" mode="scaleToFill" />
											<view class="comment-header_title--label">{{$t('project.comment')}}
												<text class="comment-header_title--sum">({{item.Replies}})</text>
											</view>
										</view>
									</view>
									<!--评论上方导航栏结束-->
									<!--评论的内容开始-->
									<template v-for="(replies,index) in item.ReplyList">
										<view>
											<view class="detail-comment_item u-flex u-col-top"
												style="margin-left: 35rpx;">
												<!--评论的头像开始-->
												<view class="comment-item_avatar" @click="go2User(replies.AddAcc)">
													<u-image v-if="replies.UserAvatar" width="60rpx" height="60rpx"
														border-radius="60rpx" :src="replies.UserAvatar"></u-image>
													<u-image v-else width="60rpx" height="60rpx" border-radius="60rpx"
														src="/static/images/avatar.jpg"></u-image>
												</view>
												<!--评论的头像结束-->
												<view class="comment-item_content u-flex-1">
													<view class="item-content_header u-flex u-row-between u-col-top">
														<view class="flex">
															<!--评论的姓名开始-->
															<view class="item-content_header--left">
																<view class="item-content_header--name"
																	@click="go2User(replies.AddAcc)">
																	{{replies.UserName}}
																</view>
															</view>
															<!--评论的姓名结束-->
															<!--评论的日期开始-->
															<view class="item-content-time">{{replies.AddTimeText}}
															</view>
															<!--评论的日期结束-->
														</view>
														<view class="article-handle u-flex" style="margin-top: 5rpx;">
															<!--评论的评论按钮开始-->
															<view class="article-handle_item u-flex u-row-center"
																style="margin-left: 14rpx"
																@click="actComment1(replies.Topic,replies.Rid)">
																<text
																	class="icon icon-pinglun article-handle_item--icon"></text>
																<text
																	class="article-handle_item--text">{{replies.Replies}}</text>
															</view>
															<!--评论的评论按钮结束-->
															<!--评论的删除按钮开始-->
															<view class="item-content_header--right"
																v-if="replies.AddAcc == vuex_user.uid"
																style="margin-left: 14rpx">
																<i class="icon icon-shanchu" style="font-size:30rpx"
																	@click="actDeleteReplyShow(item.Tid,replies.Rid)"></i>
															</view>
															<!--评论的删除按钮结束-->
														</view>
													</view>
													<!--评论的内容开始-->
													<!-- 	<rich-text class="item-content_text" :nodes="replies.Content">
													</rich-text> -->
													<u-parse :content="replies.Content"
														:containerStyle="'font-size: 26rpx;color: #5D5D5F;word-break: break-all;word-break: break-word;white-space: pre-line;'"
														:selectable="true"></u-parse>
													<!--评论的内容结束-->
													<!--评论的视频开始-->
													<view class="article-video" v-if="replies.VodSrc != ''"
														@click.stop="actVideoPlay(replies.VodSrc)">
														<image class="article-video_img" mode="aspectFit"
															:src="replies.VodImg"></image>
														<view class="article-video_play" v-if="!isPlay">
															<image class="article-video_play--icon"
																src="/static/images/home/play.png" mode="scaleToFill" />
														</view>
													</view>
													<!--评论的视频结束-->
													<!--评论的图片开始-->
													<view class="article-images" v-if="replies.ImgPackJson != ''">
														<template v-for="(img, index) in replies.ImgPackJson">
															<reply-images-item :item="img" :index="index"
																:imgjson="replies.ImgPackJson">
															</reply-images-item>
														</template>
													</view>
													<!--评论的图片结束-->
													<text class="article-content_friends"
														v-if="replies.FriendAccName">{{replies.FriendAccName}}</text>
												</view>
											</view>
										</view>
										<!--评论的评论开始界面-->
										<view>
											<view class="comment-box-reply">
												<view v-for="(item1,index) in replies.RepliesDetails">
													<view class="u-flex u-col-top" style="margin-top: 5px;">
														<!--评论的评论的姓名开始-->
														<view class=" nowrap "
															style="display : flex;margin-left: 15px;">
															<view class="item-content_text" style="color: #000000;"
																v-if="item1.Lev ==0" @click="go2User(item1.AddAcc)">
																{{item1.UserName}}&nbsp;：
															</view>
															<view class="item-content_text" style="color: #000000;"
																v-if="item1.Lev == 1" @click="go2User(item1.AddAcc)">
																{{item1.UserName}}&nbsp;
																<u-icon name="play-right-fill" size="20" color="#8f9696"
																	class="u-m-l-10 u-m-r-10"></u-icon>
															</view>
															<view class="item-content_text" style="color: #000000;"
																v-if="item1.Lev == 1" @click="go2User(item1.ReplyId)">
																{{item1.ReplyName}}
																：
															</view>
														</view>
														<!--评论的评论的姓名结束-->
														<view>
															<!--评论的内容开始-->
															<!-- 		<rich-text class="item-content_text" :nodes="item1.Content">
															</rich-text> -->
															<u-parse :content="item1.Content"
																:containerStyle="'font-size: 26rpx;color: #5D5D5F;word-break: break-all;word-break: break-word;white-space: pre-line;'"
																:selectable="true"></u-parse>
															<!--评论的内容结束-->
															<!--评论的视频开始-->
															<view class="article-video" v-if="item1.VodSrc != ''"
																@click.stop="actVideoPlay(item1.VodSrc)">
																<image class="article-video_img" mode="aspectFit"
																	:src="item1.VodImg"></image>
																<view class="article-video_play" v-if="!isPlay">
																	<image class="article-video_play--icon"
																		src="/static/images/home/play.png"
																		mode="scaleToFill" />
																</view>
															</view>
															<!--评论的视频结束-->
															<!--评论的图片开始-->
															<view class="article-images" v-if="item1.ImgPackJson">
																<template v-for="(img, index) in item1.ImgPackJson">
																	<view class="article-images_item"
																		@click.stop="actPreviewImageReply(img, index,item1.ImgPackJson)">
																		<u-image class="article-video_play--icon"
																			mode="scaleToFill" width="60rpx"
																			height="60rpx" :src="img.Src"></u-image>
																	</view>
																</template>
															</view>
															<!--评论的图片结束-->
															<text class="article-content_friends"
																v-if="item1.FriendAccName">{{item.FriendAccName}}</text>
														</view>
													</view>
													<view class="u-flex u-m-l-30">
														<!--评论的日期开始-->
														<view class="item-reply-reply-time">{{item1.AddTimeText}}</view>
														<!--评论的日期结束-->

														<!--评论的评论按钮开始-->
														<view class="u-flex u-row-center u-m-l-14" style="color:#999"
															@click="actComment1(item1.Topic,item1.Rid)">
															<text
																class="icon icon-pinglun article-handle_item--icon"></text>
															<text
																class="article-handle_item--text">{{item1.Replies}}</text>
														</view>
														<!--评论的评论按钮结束-->
														<!--评论的删除按钮开始-->
														<view class="item-content_header--right"
															v-if="item1.AddAcc == vuex_user.uid"
															style="margin-left: 14rpx">
															<i class="icon icon-shanchu"
																style="color:#999;font-size:30rpx"
																@click="actDeleteReplyShow(item.Tid,item1.Rid)"></i>
														</view>
														<!--评论的删除按钮结束-->
													</view>
												</view>
											</view>
										</view>
									</template>
									<!--评论的内容结束-->
								</view>
								<!--评论的界面显示结束-->
							</view>
							<u-modal v-model="deleteReplyShow" :show-cancel-button="true" :show-title="false"
								:cancelText="$t('mine.btn_cancel')" :confirmText="$t('mine.btn_confirm')"
								:content="$t('mine.bbs_confirm_del_reply')" @confirm="actDeleteReply()"></u-modal>
							<u-loadmore :status="loadStatus" :icon-type="iconType" :load-text="loadText"
								margin-bottom="45" margin-top="45" color="#C1C0C0" />
						</template>
						<view class="empty-wrap" v-else>
							<u-empty :text="empty_text" mode="list"></u-empty>
						</view>
						<!-- 删除动态 -->
						<u-modal v-model="deleteShow" :show-cancel-button="true" :show-title="false" cancelText="考虑一下"
							confirmText="确定" content="确定删除当前动态吗" @confirm="actCommentDel"></u-modal>
						<!-- 发布帖子 -->
						<u-popup v-model="isComment" mode="bottom" :safe-area-inset-bottom="true">
							<view class="comment-box">
								<u-avatar :src="vuex_user.avatar"></u-avatar>
								<view class="inputStyle">
									<textarea v-model="form.Content" placeholder-style="color:#999"
										placeholder="写个评论..." @input="commentInput" @blur="textblur" />
									<view class="publish-images" v-if="!showUploadList">
										<template v-for="(item, index) in fileList">
											<view class="publish-images_item" :data-index="index"
												@click.stop="actPreviewImage">
												<view @click.stop="deleteItem(index)">
													<u-icon width="42" height="42" name="close-circle-fill"
														color="#fa3534" size="42"></u-icon>
												</view>
												<u-image width="118rpx" height="118rpx" :src="item.url"
													mode="aspectFill" border-radius="10">

												</u-image>

											</view>
										</template>

										<!-- 视频 -->
										<view class="uni-uploader__file" v-if="src != ''">
											<view class="uploader_video" @click="actVideoPlay(src)">
												<view @click.stop="delectVideo()" class="close-icon">
													<u-icon width="46" height="46" name="close-circle-fill"
														color="#fa3534" size="46"></u-icon>
												</view>
												<image class="uploader_video_play--icon"
													src="/static/images/home/play.png" mode="scaleToFill" />
												<u-image width="118rpx" height="118rpx" class="article-video_img"
													mode="widthFix"
													:src="VodImg+'?imageMogr2/crop/118x118/gravity/center'"
													v-if="!isPlay"></u-image>
											</view>
											<video id="video" :src="src" class="video" object-fit="fill"
												:autoplay="autoplay" @fullscreenchange="fullscreenchange"
												@ended="closeVideoPlay" v-if="isPlay"></video>
										</view>
									</view>
									<view class="publish-friends" v-if="JSON.parse(JSON.stringify(friends)).length > 0">
										<text class="publish-friends_item"
											v-for="item in friends">@{{item.FriendName}}</text>
									</view>
								</view>
								<button class="comBtnStyle u-m-t-25" @click="isCommonTerms = true">快捷短语</button>
								<view class="u-flex">
									<view class="icon icon-biaoqing-expression1-01 u-m-l-30 u-m-t-10 u-m-r-20"
										@click.stop="actEmojiShow()" style="font-size:58rpx;color: #7e7f84"></view>
									<view class="publish-handle_left u-flex u-m-t-10">
										<u-upload :custom-btn="true" ref="uUpload" :show-upload-list="showUploadList"
											:action="action" :formData="formData" @on-success="uploadSuccess"
											max-count="9" v-if="src == ''" width="750">
											<template v-slot:addBtn class="u-flex" hover-class="slot-btn__hover"
												hover-stay-time="150">
												<text class="icon icon-tupian1" style="color: #464747"></text>
											</template>
										</u-upload>
										<view class="u-m-l-30" @click="actChooseVideo"
											v-show="JSON.parse(JSON.stringify(fileList)).length == 0">
											<text class="icon icon-shipin"></text>
										</view>
										<view class="u-m-l-30" style="margin-top:-8rpx"
											@click="$goPage('/note/friends', {}, true)">
											<text class="">@</text>
										</view>
										<button class="btnStyle u-m-l-30" :disabled="isSend" @click="submit('动态')"
											style="margin-right: 0;margin-top: -10rpx">{{$t('project.btn_publish')}}</button>
									</view>
								</view>
								<view v-if="emojiShow" class="TUI-Emoji-area">
									<TUI-Emoji @enterEmoji="appendMessage"></TUI-Emoji>
								</view>
							</view>
						</u-popup>
						<u-popup v-model="isCommonTerms" mode="top" :mask="false">
							<view class="tui-common-words-container">
								<view class="tui-common-words-box">
									<view class="tui-common-words-title">
										<view></view>
										<view style="color: #006EFF; font-family: PingFangSC-Regular;"
											class="tui-common-words-close" @tap="isCommonTerms = false">
											{{$t('project.common_close')}}
										</view>
									</view>
									<scroll-view class="tui-common-words-list" scroll-y="true" enable-flex="true">
										<view v-for="(item, index) in commonWordsList" :key="index"
											class="tui-common-words-item" @tap="checkCommonWord"
											:data-words="item.Title">{{item.Title}}</view>
									</scroll-view>
								</view>
							</view>
						</u-popup>
						<!-- 转发群聊 -->
						<!-- 						<u-popup v-model="isTransfer" mode="center" border-radius="20">
							<view class="check-box">
								<view class="check-title">转发群聊</view>
								<scroll-view scroll-y="true" style="height: 500rpx;">
									<u-radio-group @change="radioGroupChange">
										<view class="check-item u-flex u-border-bottom"
											v-for="(item, index) in groupList" :key="index">
											<view style="width:400rpx;" class="check-item_txt u-flex-1">
												{{item.GroupName}}
											</view>
											<u-radio :name="item.Gid" v-model="item.Gid"></u-radio>
										</view>
									</u-radio-group>
								</scroll-view>
								<view>仅支持文字转发</view>
								<view class="confrim-btn">
									<u-button style="margin-top: 8rpx;" type="primary" @click="actTransfer">转发
									</u-button>
								</view>
							</view>
						</u-popup> -->
						<view class="fixed-publish" @click="goPublish(2)">
							<u-image width="84rpx" height="84rpx" src="/static/images/issue.png" mode=""></u-image>
						</view>
					</scroll-view>
				</swiper-item>
				<swiper-item class="detail-contnet_swiper--item">
					<group-box :pid="project" v-if="current == 1"></group-box>
				</swiper-item>
				<swiper-item class="detail-contnet_swiper--item">
					<scroll-view scroll-y class="detail-contnet_swiper--scroll" style="height: 100%"
						@scrolltolower="onreachBottom" @refresherrefresh="handleRefresher" refresher-enabled="true"
						:refresher-triggered="isTriggered">
						<view class="detail-contract_header">
							<!--                            <view class="detail-contract_header&#45;&#45;name">-->
							<!--                                <text class="icon icon-lunchuan"></text>-->
							<!--                                <text class="detail-contract_header&#45;&#45;text">{{ shipInfo.Item13 }}</text>-->
							<!--                            </view>-->
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">船舶中文名：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item13 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">船舶英文名：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item14 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">船舶俄文名：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item15 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">所属部门：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item24 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">船籍：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item17 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">船舶类型：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item16 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">船级社：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item19 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">入级时间：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item18 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">IMO：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item20 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">建造时间：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item22 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">建造船厂：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item23 }}</text>
							</view>
							<view class="detail-contract_attrs">
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">船舶设计号：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item67 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">系列名称：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item66 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">最大船长：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item49 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">船宽：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item27 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">型深：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item28 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">艉吃水：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item47 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">载重吨：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item29 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">排水量：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item30 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">经济航速：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item31 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">装卸设备：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item32 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">压载泵个数：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item42 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">压载舱总容量：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item41 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">主机型号：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item33 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">主机厂商：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item34 }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">主机数量：</text>
									<text class="repair-item_cell--value">{{ shipInfo.Item35 }}</text>
								</view>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">辅机型号：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item36 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">辅机厂商：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item37 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">辅机数量：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item38 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">船舶所有人公司：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item50 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">船舶管理公司：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item25 }}</text>
							</view>
							<view class="repair-item_cell">
								<text class="repair-item_cell--label">船舶经营公司：</text>
								<text class="repair-item_cell--value">{{ shipInfo.Item26 }}</text>
							</view>
							<view class="repair-item_cell u-flex">
								<text class="repair-item_cell--label">产权证书：</text>
								<!--                                <view class="repair-item_cell&#45;&#45;value" @click="actPreviewImage(0)">-->
								<!--                                    <u-image width="100" src="/static/images/home/img_02.png" mode="widthFix"></u-image>-->
								<!--                                </view>-->
							</view>
						</view>
					</scroll-view>
				</swiper-item>
				<swiper-item class="detail-contnet_swiper--item" @touchstart="touchStart" @touchend="touchEnd"
					catchtouchmove="stopTouchMove">
					<scroll-view scroll-y class="detail-contnet_swiper--scroll" style="height: 100%"
						@scrolltolower="onreachBottom" @refresherrefresh="handleRefresher" refresher-enabled="true"
						:refresher-triggered="isTriggered">
						<view class="search-header" v-if="current == 3" style="color: #006EFF;">
							<u-search :show-action="true" action-text="取消" height="64" shape="square" v-model="keyword"
								placeholder="请输入编号或工程内容" @custom="actCancel" :focus="false" @focus="openList"
								@search="actSearch"></u-search>
						</view>
						<view v-show="historySearchDetail">
							<view class="history" v-if="searchHistoryList.length>=1">
								<view class="iconfont icon-lishi:before" style="width: 17rpx;display: inline;"></view>
								<text class="history_text">历史搜索</text>
								<view class="icon icon-shanchu" style="float: right;margin-right: 20rpx;"
									@click="clearHistory()"></view>

								<view class="history_viewContent">
									<view class="history_view" v-for="(item,index) in searchHistoryList" :key="index"
										@click="itemSearch(item)">
										{{item}}
									</view>
								</view>
							</view>
						</view>
						<!-- 	<view class="search-header" v-if="current == 3" style="color: #006EFF;"
							@click="goKeepProjectItem">
							进入收藏修理单 <u-icon name="arrow-right-double" size="32"></u-icon>
						</view> -->
						<view class="detail-repair_header u-flex" v-if="menu.ProjectName != ''">
							<view class="detail-repair_header--left u-flex-1">
								<view class="u-flex u-col-top">
									<view class="detail-repair_header--name u-flex-1 mgr-30" @click="getItemList">
										<text class="icon icon-lunchuan" style="font-size: 48rpx;"></text>
										<text class="detail-repair_header--text"
											:selectable="true">{{ menu.ProjectName }}</text>
									</view>
									<view class="detail-repair_header--right">
										<u-button class="detail-repair_header--button w-140" plain
											@click="$goPage('/repair/project',{project:project,iid:iid,title:$t('project.log')})">
											{{$t('project.log')}}
										</u-button>
										<u-button class="detail-repair_header--button w-140 mgt-20" plain
											@click="actShowExport">{{$t('project.export')}}
										</u-button>
									</view>
								</view>
								<view class="detail-repair_header--price" v-if="menu.AmountText != '' && prcPermission">
									<view>
										<text>总金额：</text>
										<text class="detail-repair_header--number">{{ menu.AmountText }}</text>
									</view>
									<span v-if="discount!=0" class="u-flex">
										<text stype="margin-left: 20rpx; padding-left: 20rpx;"> 折扣率：</text>
										<text class="detail-repair_header--number u-m-r-50"> {{ discount }}% </text>
										折扣后：
										<text class="detail-repair_header--number"> {{ menu.DisAmountText }}</text>
										<!-- <text class="detail-repair_header--number"> {{ parseFloat(menu.AmountText.replace(/[,]/g,""))*(100-discount)/100}}</text> -->
									</span>

								</view>
								<template v-for="(item,index) in menu.MenuList">
									<view class="project-header_item_flex">
										<view
											:class="['project-header_item project-header_item_flex', (index == menu.MenuList.length -1) ? 'current':'']"
											@click="getItemList(item.Iid)">

											<text class="project-header_text current"
												v-if="index == menu.MenuList.length -1">
												<text class="indexno" v-if="item.IndexNo">{{item.IndexNo}}</text>
												<text class="u-m-l-10" style="color: black;"
													:selectable="true">{{item.ItemName}}</text>
											</text>
											<view class="has_children" v-if="index != menu.MenuList.length -1">
												<i class="icon icon-mulu" style="color: #fff"></i>
												<text class="indexno" v-if="item.IndexNo">{{item.IndexNo}}</text>
												<text class="u-m-l-10" :selectable="true">{{item.ItemName}}</text>
											</view>

										</view>
									</view>
								</template>
							</view>
						</view>
						<view class="detail-repair_content"
							v-if="projectItemList && JSON.parse(JSON.stringify(projectItemList)).length > 0">
							<u-checkbox-group class="detail-repair_group">
								<view class="detail-repair_item u-flex" v-for="(item, index) in projectItemList">
									<view class="checkbox-box" v-if="isCheck">
										<u-checkbox @change="checkChange" v-model="item.checked" :name="index">
										</u-checkbox>
									</view>
									<!-- <view class="u-flex-1" @click="$goPage('/repair/project',{project: item.Project, iid: item.Iid})"> -->
									<view class="u-flex-1"
										@click="goToProjectOrConfirm(item.Project, item.Iid ,item.IsConfirm)">

										<view class="detail-repair_item--name u-flex u-row-between u-col-top">
											<view class="u-flex u-col-top">
												<view class="detail-repair_item--order u-border u-m-r-10"
													v-if="item.IndexNo != ''">
													{{ item.IndexNo }}
												</view>
												<text class="u-flex-1" :selectable="true">{{item.ItemName}}
													<text class="tag"
														v-if="item.IsConfirm != 0 ">{{$t('project.confirm_stat.'+item.IsConfirm)}}</text>
													<!-- <text class="tag" v-if="item.IsConfirm == 1 ">待船方确认</text>
													<text class="tag" v-if="item.IsConfirm == 2 ">待JOINTTOP确认中</text>
													<text class="tag" v-if="item.IsConfirm == 3 ">船方驳回</text>
													<text class="tag" v-if="item.IsConfirm == 4 ">JOINTTOP驳回</text>
													<text class="tag" v-if="item.IsConfirm == 5 ">JOINTTOP驳回编辑待船方确认</text>
													<text class="tag" v-if="item.IsConfirm == 6 ">船方驳回编辑待JOINTTOP确认</text>
													<text class="tag" v-if="item.IsConfirm == 7 ">船方已确认</text>
													<text class="tag" v-if="item.IsConfirm == 8 ">JOINTTOP已确认</text> -->
												</text>
											</view>
											<u-icon name="arrow-right" color="#909399" top="10"></u-icon>
										</view>
										<view class="detail-repair_item--info u-flex">
											<view v-if="prcPermission" class="detail-repair_item--child u-flex-1">
												{{$t('project.total_amount')}}:
												<text class="detail-repair_item--number"
													style="color: #676767">{{item.SumAmountText}} </text>
												<text v-if="item.AmountText != '0'"> (本项:{{item.AmountText}})</text>
											</view>
											<!-- <view class="detail-repair_item--child child-btn" v-if="item.Count > 0"
												@click.stop="getItemList(item.Iid)">
												<text class="detail-repair_item--child__label" style="color: #006EFF;">子项目 </text>
												<text
													class="detail-repair_item--child__value child-btn_count" style="color: #006EFF;">{{ item.Count }}</text>
											</view> -->
											<view class="detail-repair_header--right">
												<u-button v-if="item.Count > 0" class="detail-repair_header--button"
													plain @click.stop="getItemList(item.Iid)">
													子项目{{item.Count}}
												</u-button>
											</view>
										</view>
									</view>
									<!-- <view style="" @click="actKeep(item, item.IsKeep)">
										<u-icon v-if="item.IsKeep == 0" name="star" size="32"></u-icon>
										<u-icon v-else name="star-fill" size="32" color="#2979ff"></u-icon>
									</view> -->
								</view>
							</u-checkbox-group>
							<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" margin-bottom="45"
								margin-top="45" color="#C1C0C0" />
							<view class="check-footer" v-if="isCheck">
								<u-button size="mini" v-if="isNext" @click="actCheck()">下一步</u-button>
							</view>
						</view>
						<view class="empty-wrap" v-else>
							<u-empty text="暂无修理单" mode="list"></u-empty>
						</view>
						<u-popup v-model="isCheckPopup" mode="center" border-radius="20">
							<view class="popup-box">
								<view class="popup-title">{{ popupTitle }}</view>
								<scroll-view scroll-y="true" style="height: 530rpx;">
									<u-radio-group @change="radioChange">
										<view class="popup-item u-flex u-border-bottom"
											v-for="(item, index) in checkLists" :key="index">
											<view class="popup-item_txt u-flex-1">{{ item.name }}</view>
											<u-radio :name="item.id" v-model="item.name"></u-radio>
										</view>
									</u-radio-group>
								</scroll-view>
								<view class="confrim-btn">
									<u-button type="primary" @click="changeStatSubmit">确定</u-button>
								</view>
							</view>
						</u-popup>
						<u-modal v-model="showExport" :title="$t('project.export_title')" :show-cancel-button="true"
							:confirm-text="$t('project.btn_confirm')" :cancel-text="$t('project.btn_cancel')"
							@confirm="sendEmail">
							<!-- <view v-if="$store.state.vuex_user && $store.state.vuex_user.email != ''" class="center">Email：{{$store.state.vuex_user.email}}
							</view> -->
							<view class="reject-content1" v-for="(item, index) in emaillist">
								{{$t('mine.user_email')}}：<span>{{item}}</span><br>
							</view>
							<view class="reject-content2">
								<!-- <u-button @click="showAddEmail" >添加邮箱地址</u-button> -->
								<u-button type="primary" :plain="true" text="添加邮箱地址"
									@click="showAddEmail">{{$t('mine.add_email')}}</u-button>
							</view>
							<view class="reject-content">
								<u-input :placeholder="$t('project.export_content')" v-model="exportContent"
									type="textarea" height="140" />
							</view>
							<u-modal v-model="showExportEmail" :title="$t('mine.add_email')" :show-cancel-button="true"
								:confirm-text="$t('project.btn_confirm')" :cancel-text="$t('project.btn_cancel')"
								@confirm="addEmail">
								<view class="reject-content">
									<u-input :placeholder="$t('mine.email_form')" v-model="exportEmailNew"
										type="textarea" height="140" />
								</view>
							</u-modal>
						</u-modal>
					</scroll-view>
				</swiper-item>
				<swiper-item class="detail-contnet_swiper--item confirm">
					<!-- <scroll-view scroll-y class="detail-contnet_swiper--scroll" style="height: 100%;margin-top: -100rpx"
						@scrolltolower="onreachBottom"
						 @refresherrefresh="handleRefresher"
						 refresher-enabled="true"
             :refresher-triggered="isTriggered"
						>
						<view class="detail-repair_content" v-if="confirmList && JSON.parse(JSON.stringify(confirmList)).length > 0">
							<u-checkbox-group class="detail-repair_group">
								<template v-for="(item, index) in confirmList">
									<view class="detail-repair_item">
										<view class="u-flex"
											style="align-items: flex-end;justify-content: space-between;">
											<view>
												<u-checkbox class="detail-repair_item--checkbox" @change="confirmChange"
													v-model="item.Checked" :name="index" style="width: 40rpx">
												</u-checkbox>
												<view class="detail-repair_item--order u-border"
													v-if="item.IndexNo != ''" style="margin-right: 10rpx">
													{{item.IndexNo}}
												</view>
												<u-tag text="顾客驳回修改" type="warning" size="mini"
													v-if="item.IsConfirm == 6"></u-tag>
											</view>
											<text class="confirm-header_state blue"
												@click="$goPage('/repair/edit',{title:'编辑',project:item.Project,iid:item.Iid,stat:5})">
												<u-icon name="edit-pen"></u-icon>驳回编辑
											</text>
										</view>
										<view class="detail-repair_item--name u-flex"
											style="padding-top: 6rpx;color:#3B8DFF;font-size:32rpx"
											@click="goProject(item.Project, item.Iid)">
											<text
												class="u-flex-1"><label>【{{ i18n.add_sub_pro[item.ChangeType]}}】</label>{{ item.ItemName }}</text>
										</view>
										<view class="detail-repair_item--info">
											<view class="detail-repair_item--child">单位：
												<text class="detail-repair_item--value">{{ item.Unit }}</text>
											</view>
											<view class="detail-repair_item--child">单价：
												<text class="detail-repair_item--number">{{ item.PriceText }}</text>
											</view>
											<view class="detail-repair_item--child">数量：
												<text class="detail-repair_item--value">{{ item.QtyText }}</text>
											</view>
											<view class="detail-repair_item--child">总额：
												<text class="detail-repair_item--value">{{ item.AmountText }}</text>
											</view>
											<view class="detail-repair_item--child textarea">备注：
												<text class="detail-repair_item--value">{{ item.Rmk }}</text>
											</view>
										</view>
									</view>
								</template>
							</u-checkbox-group>
							<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" margin-bottom="45"
								margin-top="45" color="#C1C0C0" />
						</view>
						<view class="empty-wrap" v-else style="position:fixed;top:100rpx;left:50%;transform:translateX(-50%)">
							<u-empty text="暂无待确认单" mode="list"></u-empty>
						</view>
					</scroll-view> -->
					<!-- <view class="confirm-footer" v-if="confirmFooterDisplay  && JSON.parse(JSON.stringify(confirmArr)).length > 0">
						<u-checkbox class="list-checkbox" v-model="allChecked" label-size="28" @change="checkedAll"
							style="margin-left:20rpx">全选</u-checkbox>
						<u-button size="mini" @click="confirmReject">{{i18n.btn_reject}}</u-button>
						<u-button size="mini" type="primary" plain @click="confirmSubmit(2)">确认</u-button>
						<u-button size="mini" type="primary" plain @click="confirmSubmit(2)">驳回编辑</u-button>
					</view>
					<!- - 驳回备注 -->
					<!-- <u-modal v-model="showRemark" :title="i18n.btn_reject" :show-cancel-button="true"
						:confirm-text="i18n.send" @confirm="confirmSubmit(3)">
						<view class="reject-content">
							<u-input :placeholder="i18n.pub_tips" v-model="rmkcontent" type="textarea" height="140"
								maxlength="-1" />
						</view>
					</u-modal> -->
					<confirm-box :project="project" :tab="tabnew" :confirm="confirm" v-if="current == 4"></confirm-box>
				</swiper-item>
				<swiper-item class="detail-contnet_swiper--item">
					<scroll-view scroll-y class="detail-contnet_swiper--scroll" style="height: 100%"
						@scrolltolower="onreachBottom" @refresherrefresh="handleRefresher" refresher-enabled="true"
						:refresher-triggered="isTriggered">
						<view v-if="ctrPermission == 1">
							<view class="detail-contract_header">
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">修理费用：</text>
									<text class="repair-item_cell--value">{{ contract.FeeText }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">修理工期：</text>
									<text class="repair-item_cell--value">{{ contract.Period }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">质保期限：</text>
									<text class="repair-item_cell--value">{{ contract.Quality }}</text>
								</view>
								<view class="repair-item_cell">
									<text class="repair-item_cell--label">合同文件：</text>
									<text class="repair-item_cell--value" v-for="(item,index) in files">
										<template v-for="(item2,index2) in item.AttPackJson">
											<preview-pdf :item="item2" :index="index2"></preview-pdf>
										</template>
									</text>
								</view>
							</view>
							<view class="detail-contract_content">
								<view class="detail-comment_header u-flex u-row-between u-border-bottom">
									<view class="comment-header_title u-flex">
										<image class="comment-header_title--icon"
											src="/static/images/home/icon-shequ.png" mode="scaleToFill" />
										<view class="comment-header_title--label">合同意见</view>
									</view>
								</view>
								<template v-if="contractReply.length >0">
									<view class="article-item" v-for="(item, index2) in contractReply">
										<view class="article-header u-flex">
											<view class="article-header_avatar" @click.stop="go2User(item.AddAcc)">
												<u-image v-if="item.AddAccAvatar" width="85rpx" height="85rpx"
													border-radius="85rpx" :src="item.AddAccAvatar"></u-image>
												<u-image v-else width="85rpx" height="85rpx" border-radius="85rpx"
													src="/static/images/avatar.jpg"></u-image>
											</view>
											<view class="article-header_name u-flex-1">
												<view class="article-header_name--text"
													@click.stop="go2User(item.AddAcc)">{{ item.AddAccName }}</view>
												<view class="article-header_time">{{ item.AddTimeText }}</view>
											</view>
											<view class="article-header_comment" @click="actComment(item.Tid)">
												<text class="icon icon-pinglun"></text>
												{{$t('project.comment')}}
											</view>
										</view>
										<!-- <rich-text class="article-content" :nodes="item.Content"></rich-text> -->
										<u-parse :content="item.Content"
											:containerStyle="'font-size: 30rpx;margin-bottom: 24rpx;word-break: break-all;word-break: break-word;white-space: pre-line;'"
											:selectable="true"></u-parse>

										<view class="article-video" v-if="item.VodSrc != ''"
											@click.stop="actVideoPlay(item.VodSrc)">
											<image class="article-video_img" mode="aspectFit" :src="item.VodImg">
											</image>
											<view class="article-video_play" v-if="!isPlay">
												<image class="article-video_play--icon"
													src="/static/images/home/play.png" mode="scaleToFill" />
											</view>
										</view>
										<view class="article-images" v-else>
											<template v-for="(img, index) in item.ImgPackJson">
												<images-item :item="img" :index="index" :imgjson="item.ImgPackJson">
												</images-item>
											</template>
										</view>
										<template v-for="replies in item.ReplyList">
											<view class="detail-comment_item u-flex u-col-top u-border-top">
												<view class="comment-item_avatar" @click.stop="go2User(replies.AddAcc)">
													<u-image v-if="replies.UserAvatar" width="68rpx" height="68rpx"
														border-radius="68rpx" :src="replies.UserAvatar"></u-image>
													<u-image v-else width="68rpx" height="68rpx" border-radius="68rpx"
														src="/static/images/avatar.jpg"></u-image>
												</view>
												<view class="comment-item_content u-flex-1">
													<view class="item-content_header u-flex u-row-between u-col-top">
														<view class="item-content_header--left">
															<view class="item-content_header--name"
																@click.stop="go2User(replies.AddAcc)">
																{{ replies.UserName }}
															</view>
															<view class="item-content_header--time">
																{{ replies.AddTimeText }}
															</view>
														</view>
													</view>
													<view class="item-content_text">{{ replies.Content }}</view>
													<view class="article-video" v-if="replies.VodSrc != ''"
														@click.stop="actVideoPlay(replies.VodSrc)">
														<image class="article-video_img" mode="aspectFit"
															:src="replies.VodImg">
														</image>
														<view class="article-video_play" v-if="!isPlay">
															<image class="article-video_play--icon"
																src="/static/images/home/play.png" mode="scaleToFill" />
														</view>
														<video :id="'video'+index" class="article-video_item"
															:src="replies.VodSrc" :autoplay="autoplay"
															page-gesture="true" @fullscreenchange="fullscreenchange"
															@ended="closeVideoPlay" v-if="isPlay" />
													</view>
													<view class="article-images" v-else>
														<template v-for="(img, index) in item.ImgPackJson">
															<images-item :item="img" :index="index"
																:imgjson="item.ImgPackJson">
															</images-item>
														</template>
													</view>
												</view>
											</view>
										</template>
									</view>
								</template>
								<view class="empty-cnt" v-else>
									<u-empty text="暂时没有合同意见哦" mode="list"></u-empty>
								</view>
								<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText"
									margin-bottom="45" margin-top="45" color="#C1C0C0" />
								<u-popup v-model="isComment" mode="bottom" :safe-area-inset-bottom="true">
									<view class="comment-box">
										<view class="inputStyle">
											<textarea v-model="form.Content" placeholder-style="color:#999"
												placeholder="写个评论..." @input="commentInput" />
											<view class="publish-images" v-if="!showUploadList">
												<template v-for="(item, index) in fileList">
													<view class="publish-images_item" :data-index="index"
														@click.stop="actPreviewImage">
														<view @click.stop="deleteItem(index)">
															<u-icon width="42" height="42" name="close-circle-fill"
																color="#fa3534" size="42"></u-icon>
														</view>
														<u-image width="118rpx" height="118rpx" :src="item.url"
															mode="aspectFill" border-radius="10">

														</u-image>

													</view>
												</template>

												<!-- 视频 -->
												<view class="uni-uploader__file" v-if="src != ''">
													<view class="uploader_video" @click="actVideoPlay(src)">
														<view @click.stop="delectVideo()" class="close-icon">
															<u-icon width="46" height="46" name="close-circle-fill"
																color="#fa3534" size="46"></u-icon>
														</view>
														<image class="uploader_video_play--icon"
															src="/static/images/home/play.png" mode="scaleToFill" />
														<u-image width="118rpx" height="118rpx"
															class="article-video_img" mode="widthFix"
															:src="VodImg+'?imageMogr2/crop/118x118/gravity/center'"
															v-if="!isPlay"></u-image>
													</view>
													<video id="video" :src="src" class="video" object-fit="fill"
														:autoplay="autoplay" @fullscreenchange="fullscreenchange"
														@ended="closeVideoPlay" v-if="isPlay"></video>
												</view>
											</view>
											<view class="publish-friends"
												v-if="JSON.parse(JSON.stringify(friends)).length > 0">
												<text class="publish-friends_item"
													v-for="item in friends">@{{item.FriendName}}</text>
											</view>
										</view>
										<button class="btnStyle" :disabled="isSend" @click="submit('合同')">发布</button>
									</view>
								</u-popup>
								<view class="fixed-publish" @click="goPublish(3)">
									<u-image width="84rpx" height="84rpx" src="/static/images/issue.png" mode="">
									</u-image>
								</view>
							</view>
						</view>
						<view v-else>
							<view class="detail-repair_content ">
								<template v-if="materials && JSON.parse(JSON.stringify(materials)).length > 0">
									<view class="detail-repair_item" v-for="(item, index) in materials">
										<view class="detail-repair_item--name u-flex">
											<view class="detail-repair_item--order_blue u-border">{{ index + 1 }}</view>
											<text>{{item.Content != '' ? item.Content : '-'}}</text>
										</view>
										<view class="u-flex mgb-10">
											<view class="detail-repair_item--child__label">提出日期：</view>
											<text
												class="detail-repair_item--child__value  u-flex-1">{{ item.AddTimeText != '' ? item.AddTimeText : '-'}}</text>
										</view>
										<view class="u-flex mgb-10">
											<view class="detail-repair_item--child__label">发 起 人 ：</view>
											<text
												class="detail-repair_item--child__value  u-flex-1">{{ item.AddAccName != '' ? item.AddAccName : '-'}}</text>
										</view>
										<view class="u-flex">
											<view class="detail-repair_item--child__label">状　　态：</view>
											<view class="detail-repair_item--child__value  u-flex-1">
												{{ item.StatText != '' ? item.StatText : '-'}}
												<text v-if="item.Stat == 2 && item.DoneTimeText != ''"
													class="color-gray">
													({{ item.DoneTimeText }})</text>
											</view>
										</view>
										<view class="u-flex mgt-10" v-if="item.Type != ''">
											<view class="detail-repair_item--child__label">备件类型：</view>
											<text
												class="detail-repair_item--child__value  u-flex-1">{{item.Type}}</text>
										</view>
										<view class="u-flex mgt-10" v-if="item.TypeText != ''">
											<view class="detail-repair_item--child__label">备件描述：</view>
											<text
												class="detail-repair_item--child__value  u-flex-1">{{item.TypeText}}</text>
										</view>
										<view class="detail-repair_item--footer u-border-top u-flex u-row-right"
											v-if="item.Stat == 1">
											<view>
												<u-button size="medium" v-if="item.AddAcc == vuex_user.uid"
													:custom-style="{'padding':'0 40rpx'}"
													@click="delMaterial(item.Mid)">
													{{$t('project.btn_del')}}
												</u-button>
											</view>
											<view>
												<u-button size="medium" plain :custom-style="{'padding':'0 40rpx'}"
													@click="cfmMaterial(item.Mid)">
													{{$t('project.btn_completed')}}
												</u-button>
											</view>
										</view>
									</view>
									<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText"
										margin-bottom="45" margin-top="45" color="#C1C0C0" />
								</template>
								<view class="empty-wrap" v-else>
									<u-empty text="暂无待供备件" mode="list"></u-empty>
								</view>
								<u-modal v-model="deleteMaterial" :show-cancel-button="true" :show-title="false"
									cancelText="考虑一下" confirmText="确定" content="确定删除吗" @confirm="actDeleteMaterial">
								</u-modal>
								<u-modal v-model="comfirmMaterial" :show-cancel-button="true" :show-title="false"
									cancelText="考虑一下" confirmText="确定" content="确定完成吗" @confirm="actComfirmMaterial">
								</u-modal>

								<view class="fixed-publish" @click="isAddMaterial = true">
									<u-image width="84rpx" height="84rpx" src="/static/images/add.png" mode="">
									</u-image>
								</view>
								<u-popup v-model="isAddMaterial" mode="bottom" :safe-area-inset-bottom="true">
									<view class="comment-box">
										<view class="inputStyle mgb-10">
											<input v-model="maForm.type" placeholder-style="color:#999"
												placeholder="请输入备件类型" @input="commentInput" />
										</view>
										<view class="inputStyle">
											<textarea v-model="maForm.desc" placeholder-style="color:#999"
												placeholder="请输入备件描述" @input="commentInput" />
										</view>
										<button class="btnStyle" :disabled="isSend" @click="maSubmit">确认</button>

									</view>
								</u-popup>
							</view>
						</view>
						<!-- <view class="empty-wrap" v-else>
							<u-empty :text="i18n.permis_txt" mode="list"></u-empty>
						</view> -->
					</scroll-view>
				</swiper-item>
				<swiper-item class="detail-contnet_swiper--item">
					<scroll-view scroll-y class="detail-contnet_swiper--scroll" style="height: 100%"
						@scrolltolower="onreachBottom" @refresherrefresh="handleRefresher" refresher-enabled="true"
						:refresher-triggered="isTriggered">
						<view v-if="ctrPermission == 1" class="detail-repair_content ">
							<template v-if="materials && JSON.parse(JSON.stringify(materials)).length > 0">
								<view class="detail-repair_item" v-for="(item, index) in materials">
									<view class="detail-repair_item--name u-flex">
										<view class="detail-repair_item--order_blue u-border">{{ index + 1 }}</view>
										<text>{{item.Content != '' ? item.Content : '-'}}</text>
									</view>
									<view class="u-flex mgb-10">
										<view class="detail-repair_item--child__label">提出日期：</view>
										<text
											class="detail-repair_item--child__value  u-flex-1">{{ item.AddTimeText != '' ? item.AddTimeText : '-'}}</text>
									</view>
									<view class="u-flex mgb-10">
										<view class="detail-repair_item--child__label">发 起 人 ：</view>
										<text
											class="detail-repair_item--child__value  u-flex-1">{{ item.AddAccName != '' ? item.AddAccName : '-'}}</text>
									</view>
									<view class="u-flex">
										<view class="detail-repair_item--child__label">状　　态：</view>
										<view class="detail-repair_item--child__value  u-flex-1">
											{{ item.StatText != '' ? item.StatText : '-'}}
											<text v-if="item.Stat == 2 && item.DoneTimeText != ''" class="color-gray">
												({{ item.DoneTimeText }})</text>
										</view>
									</view>
									<view class="u-flex mgt-10" v-if="item.Type != ''">
										<view class="detail-repair_item--child__label">备件类型：</view>
										<text class="detail-repair_item--child__value  u-flex-1">{{item.Type}}</text>
									</view>
									<view class="u-flex mgt-10" v-if="item.TypeText != ''">
										<view class="detail-repair_item--child__label">备件描述：</view>
										<text
											class="detail-repair_item--child__value  u-flex-1">{{item.TypeText}}</text>
									</view>
									<view class="detail-repair_item--footer u-border-top u-flex u-row-right"
										v-if="item.Stat == 1">
										<view>
											<u-button size="medium" v-if="item.AddAcc == vuex_user.uid"
												:custom-style="{'padding':'0 40rpx'}" @click="delMaterial(item.Mid)">
												{{$t('project.btn_del')}}
											</u-button>
										</view>
										<view>
											<u-button size="medium" plain :custom-style="{'padding':'0 40rpx'}"
												@click="cfmMaterial(item.Mid)">
												{{$t('project.btn_completed')}}
											</u-button>
										</view>
									</view>
								</view>
								<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText"
									margin-bottom="45" margin-top="45" color="#C1C0C0" />
							</template>
							<view class="empty-wrap" v-else>
								<u-empty text="暂无待供备件" mode="list"></u-empty>
							</view>
							<u-modal v-model="deleteMaterial" :show-cancel-button="true" :show-title="false"
								cancelText="考虑一下" confirmText="确定" content="确定删除吗" @confirm="actDeleteMaterial">
							</u-modal>
							<u-modal v-model="comfirmMaterial" :show-cancel-button="true" :show-title="false"
								cancelText="考虑一下" confirmText="确定" content="确定完成吗" @confirm="actComfirmMaterial">
							</u-modal>

							<view class="fixed-publish" @click="isAddMaterial = true">
								<u-image width="84rpx" height="84rpx" src="/static/images/add.png" mode=""></u-image>
							</view>
							<u-popup v-model="isAddMaterial" mode="bottom" :safe-area-inset-bottom="true">
								<view class="comment-box">
									<view class="inputStyle mgb-10">
										<input v-model="maForm.type" placeholder-style="color:#999"
											placeholder="请输入备件类型" @input="commentInput" />
									</view>
									<view class="inputStyle">
										<textarea v-model="maForm.desc" placeholder-style="color:#999"
											placeholder="请输入备件描述" @input="commentInput" />
									</view>
									<button class="btnStyle" :disabled="isSend" @click="maSubmit">确认</button>

								</view>
							</u-popup>
						</view>
						<view v-else>
							<chart :project="project"></chart>
						</view>
					</scroll-view>
				</swiper-item>
				<swiper-item>
					<chart :project="project" v-if="ctrPermission == 1 && current == 7"></chart>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	import TUIEmoji from "@/components/tui-chat/message-elements/emoji/index";
	import {
		emojiName,
		emojiUrl,
		emojiMap
	} from "@/components/base/emojiMap";
	import chart from "@/pages/repair/chart/index.vue";
	import articleItem from "@/components/article-item/index.vue";
	import imagesItem from '@/components/images-item/index.vue';
	import replyImagesItem from '@/components/reply-images-item/index.vue';
	import previewPdf from '@/components/preview-pdf/index.vue';
	import confirmBox from '@/pages/staff/bench/confirm/index.vue';
	import groupBox from '@/pages/note/group/index.vue';
	// import pageMixin from '@/utils/pageMixin';
	import {
		db
	} from "@/utils/sqlite";
	import sqliteSQL from "@/utils/sqliteSQL";
	import {
		time
	} from "echarts";
	import timStore from "../../../TUIKit/TUICore/store";
	// import { TIM } from "../../../TUIKit/debug/tim";
	import {
		TIM,
		TIMUploadPlugin,
		Aegis
	} from '@/pages/TUIKit/debug/tim.js';
	import {
		getPageRandom,
		genSignNonce
	} from '@/utils/util.js'
	import homeStorage from "@/utils/storage.js";
	import {
		sendTraceData
	} from '@/utils//trace';
	export default {
		// mixins: [pageMixin],
		data() {
			return {
				historySearchDetail: false,
				BBShistorySearchDetail: false,
				project: '',
				tabnew: '',
				confirm: '',
				iid: 0,
				tabs: [{
						name: '动态'
					},
					{
						name: '群聊'
					},
					{
						name: '船舶信息'
					},
					{
						name: '修理单'
					},
					{
						name: '待确认'
					},
					{
						name: '合同'
					},
					{
						name: '待供备件'
					},
					{
						name: '甘特图'
					},
				],
				tabContracts: [{
						name: '动态'
					},
					{
						name: '群聊'
					},
					{
						name: '船舶信息'
					},
					{
						name: '修理单'
					},
					{
						name: '待确认'
					},
					{
						name: '待供备件'
					},
					{
						name: '甘特图'
					},
				],
				// 因为内部的滑动机制限制，请将tabs组件和swiper组件的current用不同变量赋值
				current: 0, // tabs组件的current值，表示当前活动的tab选项
				swiperCurrent: 0, // swiper组件的current值，表示当前那个swiper-item是活动的


				loadStatus: 'loading',
				status: 'nomore',
				iconType: 'flower',
				loadText: {
					loadmore: '轻轻上拉',
					loading: '努力加载中',
					nomore: '到底了哦'
				},

				emojiShow: false,
				isCommonTerms: false,
				words: '',
				commonWordsList: [],
				isComment: false,
				isSend: true,
				deleteReplyId: 0,
				deleteReplyTopic: 0,
				deleteReplyShow: false,
				popupTitle: '',
				chooseTypeName: '',
				chooseProject: [],
				chooseStat: 0,
				resultStat: 0,
				processStat: 0,
				itemType: 0,
				payType: 0,
				certificates: ['/static/images/home/img_02.png', '/static/images/home/img_02.png'],
				isPlay: false,
				autoplay: false,
				videoContext: null,
				pager: {
					idx: 1,
					size: 1000,
				},
				topics: [],
				keyword: '', //项目内容搜索关键词
				keywordlist: [], //搜索历史
				searchHistoryList: [],
				bbscontent: '', //动态内容搜索关键词
				BBSsearchHistoryList: [],
				projectItemList: [],
				confirmList: [],
				confirmArr: [],
				ctrPermission: 0,
				prcPermission: 0,
				apyPermission: 0,
				apyAccPermission: 0,
				confirmFooterDisplay: false,
				allChecked: false,
				permission: 0,
				contract: {},
				files: [],
				contractReply: [],
				isNext: false,
				isCheck: false,
				checkLists: [],
				isCheckPopup: false,
				form: {
					tid: '',
					comment: '',
					type: '',
				},
				maForm: [],
				materials: [],
				deleteMaterial: false,
				comfirmMaterial: false,
				mid: '',
				isAddMaterial: false,
				menu: {
					MenuList: []
				},
				deleteShow: false,
				shipInfo: {},
				showRemark: false,
				rmkcontent: '',
				xScale: 0,
				groupList: [],

				videoIdx: 0,
				vodSrc: '',

				isTransfer: false,
				checkGroupId: 0,
				checkTopic: {},

				touchStartX: 0, // 触屏起始点x
				touchStartY: 0, // 触屏起始点y
				src: "", //临时视频存放
				showUploadList: false,
				action: '',
				formData: {},
				lists: [],
				fileList: [],
				thumbnailList: [],
				previewList: [],
				VodSrc: "", //线上视频地址
				VodImg: "",
				friends: [],
				empty_text: '正在加载中...',
				discount: 0,

				topicIdx: 1,
				topicSize: 10,
				topicSearchIdx: 1,
				topicSearchSize: 10,
				stopseach: 0,
				request: false,
				scrollTop: 0,
				scrollTopReply: 0,
				scrollIndex: 0,
				isTriggered: false,
				cursorStart: 0, //光标位置
				getTopicsStatus: true,
				vuex_user: {},
				emaillist: [],
				exportEmailNew: '',
				exportEmail: '',
				showExport: false,
				showExportEmail: false,
				lastIndex: 0,
				lastPrandom: '',
			}
		},

		onLoad(options) {
			let pages = getCurrentPages();
			// console.log(pages[pages.length - 1].route)
			this.current = this.swiperCurrent = parseInt(options.tab) || 0;
			// console.log('this.options-----------------------------------------', options)
			this.project = options.project;
			this.iid = options.iid;
			this.discount = options.discount;
			this.maidianstartfun(0)
			this.getPermissionContract();
			this.init()
		},
		onShow() {
			this.searchHistoryList = JSON.parse(uni.getStorageSync('searchList') || '[]');
			this.BBSsearchHistoryList = JSON.parse(uni.getStorageSync('searchBbsList') || '[]');
			if (this.current == 0) {
				//发布动态后,回到该页面,重新加载动态数据
				this.topicIdx = 1
				this.topics = []
			}
			this.tabsChange(this.current || 0);
			this.getPermissionContract();
			setTimeout(() => {
				this.getProjectName()
			}, 0)
		},
		components: {
			replyImagesItem,
			articleItem,
			imagesItem,
			previewPdf,
			TUIEmoji,
			chart,
			confirmBox,
			groupBox
		},
		watch: {
			current(newval) {
				// console.log("watch 里面的 NewVal 是多少",newval)
				this.tabsChange(newval)
			}
		},
		computed: {
			i18n() {
				return this.$t('project')
			},
			mine() {
				return this.$t('mine')
			},
		},
		mounted() {
			this.vuex_user = this.$store.state.vuex_user
		},
		onUnload() {},
		methods: {
			openList() {
				console.log("----openlist---:");
				this.historySearchDetail = true;
				this.BBShistorySearchDetail = true;
				// this.searchHistoryList = JSON.parse(uni.getStorageSync('searchList') || '[]')
				// if(this.searchHistoryList>=0){
				// 	this.historySearchDetail = true
				// }
			},
			//导出 修理单
			actShowExport() {
				// console.log("ffffffffffffffffffffffffffffffffffffffffffffffffffffffaaaaaaaaaaaaaaaaa",this.$store.state.vuex_user.email)
				this.showExport = true;
				const userInfo = uni.getStorageSync('userInfo')
				//	console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",this.emaillist)
				if (this.$store.state.vuex_user.email != undefined) {
					this.emaillist.length = 0;
					this.exportEmail = this.$store.state.vuex_user.email;
					this.emaillist.push(this.exportEmail);
				}

				this.exportContent = "";
				// console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",this.showExport)
			},
			showAddEmail() {
				this.showExportEmail = true;
				this.exportEmailNew = "";
			},
			addEmail() {
				if (this.exportEmailNew != "") {
					// this.exportEmail = this.exportEmail+";"+this.exportEmailNew
					// this.emaillist = this.exportEmail.split(";")
					var newStr = this.exportEmailNew.trim();

					var emillastC = newStr.substr(-1);


					// console.log(emillastC+"============1============"+newStr);
					if (emillastC == ";") {
						newStr = newStr.slice(0, newStr.length - 1)
					}

					// console.log(newStr+"============2============");
					var listnew = newStr.split(";")

					// console.log(listnew+"============3============"+listnew.length);
					//校验邮箱地址
					// if(listnew[listnew.length-1]==""){
					// 	listnew.length = listnew.length-1;
					// }
					var emailNow = 0
					var emailExp = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/;
					for (var i = 0; i < listnew.length; i++) {
						if (!emailExp.test(listnew[i])) {
							emailNow = 1;
							break;
						}
					}
					if (emailNow == 1) {
						uni.showToast({
							title: this.$t('mine.msg_email'),
							icon: 'none'
						});
						this.showExportEmail = true;
					} else {
						if (this.exportEmail != '') {
							this.exportEmail = this.exportEmail + ";" + newStr
						} else {
							this.exportEmail = newStr
						}
						this.emaillist = this.exportEmail.split(";")

						this.showExportEmail = false;
					}
				} else {
					this.showExportEmail = false;
				}
			},
			sendEmail() {
				uni.showLoading();
				this.$http.post('/client/biz/project/item/send/email', {
					pid: this.project,
					emails: this.exportEmail,
					content: this.exportContent,
				}).then(res => {
					uni.hideLoading();
					this.showExport = false;
					uni.showToast({
						title: this.$t('project.succeeded'),
					});
				});
			},
			//导出修理单结束
			// // 清空历史搜素
			clearHistory() {
				uni.showToast({
					title: '已清空'
				});
				uni.removeStorage({
					key: 'searchList'
				});

				this.searchHistoryList = [];
			},
			itemSearch(item) {
				this.keyword = item
				// this.keySearch(item)
				this.actSearch(item)
			},
			// // 清空历史搜素
			BBSclearHistory() {
				uni.showToast({
					title: '已清空'
				});
				uni.removeStorage({
					key: 'searchBbsList'
				});

				this.searchHistoryList = [];
			},
			BBSitemSearch(item) {
				this.bbscontent = item
				// this.keySearch(item)
				this.bbsSearch(item)
			},
			//评论输入框失去焦点的时候触发以此来保存光标位置
			textblur(e) {
				this.cursorStart = e.detail.cursor
			},
			// // 搜索的事件
			// keySearch(keyword) {
			// 	if (keyword == '') {
			// 		uni.showModal({
			// 			title: '搜索内容不能为空'
			// 		});
			// 	} else {
			// 		this.historySearchDetail = false
			// 		this.tabPageDetail = true
			// 		if (this.searchHistoryList.includes(keyword)) {
			// 			let i = this.searchHistoryList.indexOf(keyword);
			// 			this.searchHistoryList.splice(i, 1);
			// 			this.searchHistoryList.unshift(keyword)
			// 		} else {
			// 			this.searchHistoryList.unshift(keyword)
			// 			uni.setStorageSync('searchList', JSON.stringify(this.searchHistoryList))
			// 		}
			// 	}
			// },
			// // 搜索的清空
			// clearSearch() {
			// 	this.historySearchDetail = true
			// 	this.tabPageDetail = false
			// },
			// change(index) {
			// 	this.current = index
			// },

			init() {
				this.action = this.$store.state.fileUploadUrl;
				this.formData = {
					catalog: 'cms'
				};
			},
			actPreviewImage(e) {
				let index = e.currentTarget.dataset.index;
				let urls = [];

				this.fileList.forEach(function(item) {
					urls = urls.concat(item.url);
				});

				// 预览图片
				uni.previewImage({
					urls: urls,
					current: index,
					indicator: 'default',
					longPressActions: {
						itemList: ['发送给朋友', '保存图片', '收藏'],
						success: function(data) {
							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
						},
						fail: function(err) {
							console.log(err.errMsg);
						}
					}
				});
			},
			deleteItem(index) {
				this.$refs.uUpload.remove(index);
			},
			actChooseVideo() {
				let that = this;
				if (that.src != '') {
					uni.showToast({
						title: this.$t('home.most_one_video'),
						icon: 'none'
					});
					return;
				}

				// 上传视频
				uni.chooseVideo({
					maxDuration: 60,
					count: 1,
					camera: 'back',
					compressed: true,
					sourceType: ['camera', 'album'],
					success: (res) => {
						uni.showLoading();
						if (this.compress && (res.size / 10240 > 1025)) {
							this.videoCompress(res.tempFilePath)
						} else {
							this.videoUpload(res.tempFilePath)
						}
						// uni.uploadFile({
						// 	url: that.action, //上传接口地址
						// 	filePath: res.tempFilePath,
						// 	name: 'file',
						// 	formData:{
						// 		catalog:'cms'
						// 	},
						//  success: (uploadFileRes) => {
						// 	 var result = JSON.parse(uploadFileRes.data);
						// 	 that.VodSrc = result.data.filepath;
						// 	 that.src = res.tempFilePath;
						// 	 var arr = that.VodSrc.split('.');
						// 	 				 that.VodImg = result.data.domain+arr[0]+'_0.jpg';

						// 	 				 // 按实际上传的视频回调地址显示
						// 	 				 // that.src = result.data.domain+result.data.filepath;
						// 	 				 uni.hideLoading();
						// 	 			},
						// 	 			complete: res => {
						// 	 				uni.hideLoading();
						// 				}
						// 		});
					}
				})
			},
			videoCompress(tempFilePath) {
				uni.showLoading({
					title: '压缩中...'
				});
				var that = this;
				uni.compressVideo({
					src: tempFilePath,
					quality: 'low', //'low':低，'medium':中，'high':高
					success: function(res) {
						that.videoUpload(res.tempFilePath);
					},
					fail: function(err) {
						uni.showToast({
							title: '视频压缩失败',
							icon: 'none'
						}, 2000)
					}
				})
			},
			videoUpload(tempFilePath) {
				uni.showLoading({
					title: '上传中...'
				});
				const uploadTask = uni.uploadFile({
					url: this.action, // 自己文件上传的路径
					method: "POST",
					filePath: tempFilePath,
					name: 'file',
					formData: {
						catalog: 'cms'
					},
					success: (res) => {
						// 	this.videoContent = JSON.parse(res.data).data.filepath
						// 	// let resMessage = JSON.parse(res.data).message;
						// console.log(JSON.parse(res.data).data.filepath)
						// 	if(JSON.parse(res.data).data.filepath){
						// 		// uni.hideLoading();
						// 		uni.showToast({
						// 			title: '上传成功',
						// 			icon: 'none'
						// 		})
						// 	}

						var result = JSON.parse(res.data);
						this.VodSrc = result.data.filepath;
						this.src = res.tempFilePath;
						var arr = this.VodSrc.split('.');
						this.VodImg = result.data.domain + arr[0] + '_0.jpg';
						this.isSend = false
						uni.hideLoading();
					},
					fail: (err) => {
						console.log(err);
						uni.hideLoading();
						uni.showToast({
							title: err,
							icon: 'none'
						})
						reject(err);
					},
					complete: () => {}
				})
				uploadTask.onProgressUpdate((res) => {
					uni.showLoading({
						title: '上传中' + res.progress + '%'
					});
					if (res.progress == 100) {
						uni.hideLoading();
					}
				});
			},
			delectVideo: function() {
				uni.showModal({
					title: this.$t('home.tip'),
					Content: this.$t('home.del_video'),
					success: (res) => {
						if (res.confirm) {
							this.src = '';
							this.VodSrc = '';
							this.VodImg = '';
						}
					}
				})
			},
			uploadSuccess: function() {
				this.isSend = false
			},
			// tabs通知swiper切换
			getProjectName() {
				this.$http.get('/mgr/biz/project/name', {
					pid: this.project
				}).then(res => {
					uni.setNavigationBarTitle({
						title: res.ProjectName
					})
				})
			},
			tabsChange(index) {

				//用来给刷新计数
				this.scrollIndex = index
				switch (index) {
					case 0:
						if (this.lastIndex != index) {
							if (this.lastIndex == 2 || this.lastIndex == 7) {
								this.maidianstartfun(index);
							} else {
								this.maidianleavefun(this.lastIndex)
								this.maidianstartfun(index);
							}
						}
						this.lastIndex = index
						this.BBShistorySearchDetail = false
						this.getTopicList();
						this.getGroupList();
						break;
					case 1:

						//子组件会自动触发 创建与离开事件所以只需要离开上一个index就好
						if (this.lastIndex != 7) {
							this.maidianleavefun(this.lastIndex)
						}
						this.lastIndex = index
						this.getGroupList();
						break;
					case 2:

						if (this.lastIndex == 2 || this.lastIndex == 7) {
							this.maidianstartfun(index);
						} else {
							this.maidianleavefun(this.lastIndex)
							this.maidianstartfun(index);
						}
						this.lastIndex = index
						this.getShipInfo();
						break;
					case 3:

						if (this.lastIndex == 2 || this.lastIndex == 7) {
							this.maidianstartfun(index);
						} else {
							this.maidianleavefun(this.lastIndex)
							this.maidianstartfun(index);
						}
						this.lastIndex = index
						this.historySearchDetail = false
						this.getPermissionPrice();
						this.getItemList(this.iid);
						this.getMenu();
						break;
					case 4:

						//this.getConfirmList();
						// this.getPermissionPriceAcc();
						if (this.lastIndex == 2 || this.lastIndex == 7) {
							this.maidianstartfun(index);
						} else {
							this.maidianleavefun(this.lastIndex)
							this.maidianstartfun(index);
						}
						this.lastIndex = index
						this.getPermissionBidPriceAcc();
						break;
					case 5:

						if (this.ctrPermission == 1) {
							if (this.lastIndex == 2 || this.lastIndex == 7) {
								this.maidianstartfun(index);
							} else {
								this.maidianleavefun(this.lastIndex)
								this.maidianstartfun(index);
							}
							this.lastIndex = index

							this.getContractInfo();
							this.getContractReply();
						} else {
							if (this.lastIndex == 2 || this.lastIndex == 7) {
								this.maidianstartfun(index);
							} else {
								this.maidianleavefun(this.lastIndex)
								this.maidianstartfun(index);
							}
							this.lastIndex = index
							this.getMaterialList();
						}
						break;
					case 6:

						if (this.ctrPermission == 1) {
							if (this.lastIndex == 2 || this.lastIndex == 7) {
								this.maidianstartfun(index);
							} else {
								this.maidianleavefun(this.lastIndex)
								this.maidianstartfun(index);
							}
							this.lastIndex = index
							this.getMaterialList();
						}
						break;
					case 7:
						if (this.lastIndex != 2) {
							this.maidianleavefun(this.lastIndex)
						}
						this.lastIndex = index
						break;
				}
				if (index != this.swiperCurrent) {
					this.isComment = false;
					//this.isSend = true;
				} else {
					//暂时没想到这句话的功能,先屏蔽了
					// uni.$on('checkItem', (item) => {
					// 	console.log(item)
					// 	this.isComment = true
					// 	this.isSend = false
					// })
				}
				this.swiperCurrent = index;
				this.isAddMaterial = false;
				//this.isComment = false;
			},
			tabsChange1(index) {
				this.swiperCurrent = index;
				// this.current = index;
			},
			goProject(project, iid) {
				uni.navigateTo({
					url: '/pages/repair/project/index?project=' + project + '&iid=' + iid
				});
			},
			goToProjectOrConfirm(projectone, iidone, isConfirm) {
				if (isConfirm == 0) {
					this.$goPage('/repair/project', {
						project: projectone,
						iid: iidone
					})
					// uni.navigateTo({
					// 	url: '/pages/repair/project/index?project=' + project + '&iid=' + iid
					// });
				} else {
					if (isConfirm == 2 || isConfirm == 4 || isConfirm == 5 || isConfirm == 8) {
						this.tabnew = 1;
					} else {
						this.tabnew = 0;
					}
					this.confirm = isConfirm;
					this.tabsChange(4)
					//this.$goPage('/staff/bench/confirm',{project: projectone, iid: iidone, tab: tabnew, tabindex:isConfirm})
					// uni.navigateTo({
					// 	url: '/pages/staff/bench/confirm/index?project=' + projectone + '&iid=' + iidone +'&tab='+tabnew+'&tabindex='+isConfirm
					// });
				}
			},
			getGroupList() {
				this.$http.get('/mgr/user/group/list/data', {
					pid: this.project
				}).then(res => {
					this.groupList = res;
				});
			},
			// swiper-item左右移动，通知tabs的滑块跟随移动
			transition(e) {
				let dx = e.detail.dx;
				this.$refs.uTabs.setDx(dx);
			},
			// 由于swiper的内部机制问题，快速切换swiper不会触发dx的连续变化，需要在结束时重置状态
			// swiper滑动结束，分别设置tabs和swiper的状态
			animationfinish(e) {
				let current = e.detail.current;
				this.$refs.uTabs.setFinishCurrent(current);
				this.swiperCurrent = current;
				this.current = current;
			},
			// scroll-view到底部加载更多
			onreachBottom() {

			},
			getTopicList() {
				//getTopicsStatus为真的话应该执行获取数据
				console.log("第一次获取状态" + this.getTopicsStatus)
				if (!this.getTopicsStatus) {
					console.log("内部获取状态" + this.getTopicsStatus)
					return
				}
				this.getTopicsStatus = false
				//获取数据的时候将getTopicsStatus赋值为假使其不能多次获取
				if (this.stopseach == 0) {
					//console.log("getData获取状态"+this.getTopicsStatus)
					this.$http.get('/bbs/topic/pager/data', {
						type: 2,
						pid: this.project,
						reply: 1,
						idx: this.topicIdx,
						size: this.topicSize,
						content: this.bbscontent
					}).then(res => {
						console.log(res)
						if (this.topicIdx <= 1) {
							this.topics = res;
						} else {
							this.topics = [...this.topics, ...res];
						}
						if (res.length < this.topicSize) {
							this.stopseach = 1;
						}
						this.topicIdx = res.length < this.topicSize ? this.topicIdx : this.topicIdx + 1;
						this.loadStatus = res.length < this.topicSize ? 'nomore' : 'loading';
						if (res.length == 0) {
							this.empty_text = '暂无动态'
						}
						//console.log("getData获取完数据状态"+this.getTopicsStatus)
						this.getTopicsStatus = true
						//console.log("看看到底重复获取了几次LSIT"+JSON.stringify(this.topics));
					})

				} else {
					this.empty_text = '暂无动态'
				}
			},
			//获取刷新数据的LIST，0-x
			getTopicListNew() {
				if (this.stopseach == 0) {
					this.$http.get('/bbs/topic/pager/data', {
						type: 2,
						pid: this.project,
						reply: 1,
						idx: 0,
						size: this.topicSize * this.topicIdx,
						content: this.bbscontent
					}).then(res => {
						this.topics = res;
						if (res.length < this.topicSize) {
							this.stopseach = 1;
						}
						//this.topicIdx = res.length < this.topicSize ? this.topicIdx : this.topicIdx + 1;
						this.loadStatus = res.length < this.topicSize ? 'nomore' : 'loading';
						if (res.length == 0) {
							this.empty_text = '暂无动态'
						}
					})
				} else {
					this.empty_text = '暂无动态'
				}
			},
			getTopicListSeach() {
				this.$http.get('/bbs/topic/pager/data', {
					type: 2,
					pid: this.project,
					reply: 1,
					idx: 1,
					size: 10,
					content: this.bbscontent
				}).then(res => {
					this.topics = res;
					// if (this.topicIdx <= 1) {
					// 	this.topics = res;
					// } else {
					// 	this.topics = [...this.topics, ...res];
					// }
					// this.topicIdx = res.length < this.topicSize ? this.topicIdx : this.topicIdx + 1;
					// this.loadStatus = res.length < this.topicSize ? 'nomore' : 'loading';
					// if (res.length == 0) {
					// 	this.empty_text = '暂无动态'
					// }
				})
			},
			// async getTopicList() {
			// 	//getTopicsStatus为真的话应该执行获取数据
			// 	// console.log("第一次获取状态" + this.getTopicsStatus)
			// 	if (!this.getTopicsStatus) {
			// 		console.log("内部获取状态" + this.getTopicsStatus)
			// 		return
			// 	}
			// 	this.getTopicsStatus = false
			// 	//获取数据的时候将getTopicsStatus赋值为假使其不能多次获取
			// 	// console.log("this.stopseach", this.stopseach)
			// 	if (this.stopseach == 0) {

			// 		//获取缓存数据
			// 		let lastTopicTime = 0;
			// 		if (this.topics.length) {
			// 			lastTopicTime = this.topics[this.topics.length - 1].AddTime;
			// 		}
			// 		let options = {
			// 			page: this.topicIdx <= 1 ? 0 : this.topicIdx,
			// 			lastTopicTime: lastTopicTime
			// 		};
			// 		let data = await this.getLocalCacheList(options);
			// 		console.log("data", data);
			// 		if (data.length) {

			// 			let topicList = [];

			// 			// 检查是否有最新的社区内容
			// 			let maxTopicTime = 0;
			// 			if (this.topics.length) {
			// 				maxTopicTime = this.topics[0].AddTime;
			// 			}

			// 			//获取当前网络状况
			// 			let networkType = null;
			// 			await uni.getNetworkType({
			// 				success: function(res) {
			// 					networkType = res.networkType
			// 				},
			// 			});

			// 			if (networkType == 'none') {

			// 				this.topicIdx = data.length < this.topicSize ? this.topicIdx : this.topicIdx +
			// 					1;
			// 				this.loadStatus = data.length == 0 ? 'nomore' : 'loading';
			// 				this.getTopicsStatus = true;
			// 			}

			// 			console.log("maxTopicTime", maxTopicTime)
			// 			if (networkType != null && networkType != 'none') {
			// 				await this.$http.get('/bbs/topic/pager/data', {
			// 					type: 2,
			// 					pid: this.project,
			// 					reply: 1,
			// 					idx: 1,
			// 					size: this.topicSize,
			// 					max_topic_time: maxTopicTime,
			// 				}).then(res => {
			// 					topicList = res;
			// 					console.log("res", res);

			// 					//检查社区数据是否最新
			// 					var oldMessageTime = 0;
			// 					if (this.topics.length) {
			// 						oldMessageTime = this.topics[0].AddTime || 0;
			// 					} else {
			// 						oldMessageTime = data[0].AddTime || 0;
			// 					}
			// 					topicList = topicList.filter(item => item.AddTime > oldMessageTime)
			// 					console.log("筛选出来的", topicList)
			// 					console.log("筛选出来的", data)

			// 					if (topicList.length) {

			// 						//本地缓存
			// 						console.log("保存了11111", topicList)
			// 						this.saveLocalCacheTopic(topicList, false);

			// 						data = [
			// 							...topicList,
			// 							...data,
			// 						];
			// 					}

			// 					this.topicIdx = res.length < this.topicSize ? this.topicIdx : this.topicIdx +
			// 						1;
			// 					this.loadStatus = data.length == 0 ? 'nomore' : 'loading';
			// 					if (res.length == 0) {
			// 						this.empty_text = '暂无动态'
			// 					}
			// 					this.getTopicsStatus = true;
			// 				}).catch(err => {
			// 					this.getTopicsStatus = true;
			// 				});
			// 			}

			// 			if (this.topics.length) {
			// 				this.topics = [
			// 					...this.topics,
			// 					...data,
			// 				];
			// 			} else {
			// 				this.topics = data;
			// 			}
			// 		} else {
			// 			var lastTime = 0;
			// 			if (this.topics.length) {
			// 				lastTime = this.topics[this.topics.length - 1].AddTime;
			// 				this.topicIdx = 1;
			// 			}
			// 			console.log("lastTime", lastTime)
			// 			console.log("topicIdx", this.topicIdx)

			// 			this.$http.get('/bbs/topic/pager/data', {
			// 				type: 2,
			// 				pid: this.project,
			// 				reply: 1,
			// 				idx: this.topicIdx,
			// 				size: this.topicSize,
			// 				content: this.bbscontent,
			// 				last_topic_time: lastTime,
			// 			}).then(res => {

			// 				if (this.topics.length) {
			// 					this.topics = [...this.topics, ...res];
			// 				} else {
			// 					this.topics = res;
			// 				}

			// 				//本地缓存
			// 				console.log("保存了22222222", res)
			// 				this.saveLocalCacheTopic(res);

			// 				if (res.length < this.topicSize) {
			// 					this.stopseach = 1;
			// 				}
			// 				this.topicIdx = res.length < this.topicSize ? this.topicIdx : this.topicIdx + 1;
			// 				this.loadStatus = res.length < this.topicSize ? 'nomore' : 'loading';
			// 				this.getTopicsStatus = true;
			// 				if (res.length == 0) {
			// 					this.empty_text = '暂无动态'
			// 				}
			// 			}).catch(err => {
			// 				this.getTopicsStatus = true;
			// 			});
			// 		}

			// 		// //console.log("getData获取状态"+this.getTopicsStatus)
			// 		// this.$http.get('/bbs/topic/pager/data', {
			// 		// 	type: 2,
			// 		// 	pid: this.project,
			// 		// 	reply: 1,
			// 		// 	idx: this.topicIdx,
			// 		// 	size: this.topicSize,
			// 		// 	content: this.bbscontent
			// 		// }).then(res => {
			// 		// 	console.log(res)
			// 		// 	if (this.topicIdx <= 1) {
			// 		// 		this.topics = res;
			// 		// 	} else {
			// 		// 		this.topics = [...this.topics, ...res];
			// 		// 	}
			// 		// 	if (res.length < this.topicSize) {
			// 		// 		this.stopseach = 1;
			// 		// 	}
			// 		// 	this.topicIdx = res.length < this.topicSize ? this.topicIdx : this.topicIdx + 1;
			// 		// 	this.loadStatus = res.length < this.topicSize ? 'nomore' : 'loading';
			// 		// 	if (res.length == 0) {
			// 		// 		this.empty_text = '暂无动态'
			// 		// 	}
			// 		// 	//console.log("getData获取完数据状态"+this.getTopicsStatus)
			// 		// 	this.getTopicsStatus = true
			// 		// 	//console.log("看看到底重复获取了几次LSIT"+JSON.stringify(this.topics));
			// 		// })

			// 	} else {
			// 		this.empty_text = '暂无动态'
			// 	}
			// },
			// async getLocalCacheList(options) {
			// 	let data = await this.getStorageTopic(options);
			// 	return data;
			// },
			// async getStorageTopic(param) {
			// 	let res = await homeStorage.getData({
			// 		key: 'server_project_topic_' + this.project,
			// 		page: param.page || 0,
			// 		sequence: param.lastTopicTime,
			// 		isBefore: true,
			// 	});
			// 	return res;
			// },
			// async saveLocalCacheTopic(data, isBefore = false) {
			// 	homeStorage.insert([...data], isBefore, 'server_project_topic_' + this.project)
			// },
			// async clearLocalCacheTopic() {
			// 	homeStorage.delete('server_project_topic_' + this.project);
			// },
			// //获取刷新数据的LIST，0-x
			// async getTopicListNew() {
			// 	if (this.stopseach == 0) {

			// 		//获取当前网络状况
			// 		let networkType = null;
			// 		await uni.getNetworkType({
			// 			success: function(res) {
			// 				networkType = res.networkType
			// 			},
			// 		});

			// 		if (networkType != 'none') {
			// 			await this.clearLocalCacheTopic();
			// 		}

			// 		this.$http.get('/bbs/topic/pager/data', {
			// 			type: 2,
			// 			pid: this.project,
			// 			reply: 1,
			// 			idx: 0,
			// 			size: this.topicSize * this.topicIdx,
			// 			content: this.bbscontent
			// 		}).then(res => {
			// 			this.topics = res;

			// 			//加入本地缓存
			// 			this.saveLocalCacheTopic(res);
			// 			if (res.length < this.topicSize) {
			// 				this.stopseach = 1;
			// 			}
			// 			//this.topicIdx = res.length < this.topicSize ? this.topicIdx : this.topicIdx + 1;
			// 			this.loadStatus = res.length < this.topicSize ? 'nomore' : 'loading';
			// 			if (res.length == 0) {
			// 				this.empty_text = '暂无动态'
			// 			}
			// 		})
			// 	} else {
			// 		this.empty_text = '暂无动态'
			// 	}
			// },
			// getTopicListSeach() {
			// 	console.log(" 进来拉。。。。。。。。。。。", this.stopseach);
			// 	if (this.stopseach == 0) {
			// 		console.log(" 进来拉。。。。。。。。。。。", this.topicSearchIdx);
			// 		console.log(" 进来拉。。。。。。。。。。。", this.topicSearchSize);
			// 		this.$http.get('/bbs/topic/pager/data', {
			// 			type: 2,
			// 			pid: this.project,
			// 			reply: 1,
			// 			idx: this.topicSearchIdx,
			// 			size: this.topicSearchSize,
			// 			content: this.bbscontent
			// 		}).then(res => {
			// 			console.log("res", res);
			// 			if (this.topicSearchIdx <= 1) {
			// 				this.topics = res;
			// 			} else {
			// 				this.topics = [...this.topics, ...res];
			// 			}
			// 			if (res.length < this.topicSearchSize) {
			// 				this.stopseach = 1;
			// 			}

			// 			this.topicSearchIdx = res.length < this.topicSearchSize ? this.topicSearchIdx : this
			// 				.topicSearchIdx + 1;
			// 			this.loadStatus = res.length < this.topicSearchSize ? 'nomore' : 'loading';
			// 			if (res.length == 0) {
			// 				this.empty_text = '暂无动态'
			// 			}
			// 		});
			// 	} else {
			// 		this.empty_text = '暂无动态'
			// 	}
			// },
			getCommonWordsList() {
				this.$http.get('/cms/info/list', {
					cid: 311
				}).then(res => {
					this.commonWordsList = res;
				});
			},
			getMenu(prt) {
				this.$http.get('/client/biz/project/item/menu', {
					'project': this.project,
					'iid': prt
				}).then(res => {
					this.menu = res
				})
			},
			getShipInfo() {
				this.$http.get('/mgr/crm/ship/info', {
					'pid': this.project
				}).then(res => {
					this.shipInfo = res
				})
			},
			getItemList(prt) {
				// console.log("----" + prt);
				if (prt != undefined) {
					this.keyword = "";
				}

				if (this.iid > 0 && prt == undefined) {
					prt = this.iid;
				}
				// if (prt != 0 ) {
				// 	this.isVertical = true;
				// } else {
				// 	this.isVertical = false;
				// }
				this.$http.get('/client/biz/project/item/pager', {
					project: this.project,
					prt: prt || 0,
					keyword: this.keyword,
				}).then(res => {
					// console.log("----getItemList----"+JSON.stringify(res));
					this.projectItemList = res
					this.getMenu(prt)
					this.iid = prt
				});
			},
			getConfirmList() {
				this.$http.get('/client/biz/project/item/confirm/list', {
					project: this.project,
				}).then(res => {
					this.confirmList = res
				});
			},
			getContractInfo() {
				this.$http.get('/mgr/biz/contract/info', {
					pid: this.project,
					files: 1
				}).then(res => {
					this.permission = res.permission;
					this.contract = res.info;
					this.files = res.files;
				});
			},
			getContractReply() {
				this.$http.get('/bbs/topic/pager/data', {
					type: 3,
					pid: this.project,
					reply: 1
				}).then(res => {
					this.contractReply = res
				})
			},
			getMaterialList() {
				console.log('vuex_user', this.vuex_user)
				this.$http.get('/client/biz/material/list', {
					project: this.project
				}).then(res => {
					this.materials = res;
					console.log('materials', res)
				});
			},
			getPermissionPrice() {
				this.$http.get('/client/biz/project/item/permission/price', {
					project: this.project
				}).then(res => {
					this.prcPermission = res;
				});
			},
			//项目出价人权限
			getPermissionBidPriceAcc() {
				this.$http.get('/client/biz/project/item/permission/BidPriceAcc', {
					project: this.project
				}).then(res => {
					this.apyAccPermission = res;
				});
			},
			//出价权限
			getPermissionPriceAcc() {
				this.$http.get('/client/biz/project/item/permission/PriceAcc', {
					// project: this.project
				}).then(res => {
					// this.apyPermission = res;
					this.apyAccPermission = res;
				});
			},
			getPermissionContract() {
				let that = this;
				that.$http.get('/client/biz/project/item/permission/contract', {
					project: that.project
				}).then(res => {
					this.ctrPermission = res
					// console.log('this.ctrPermission-----------------------', this.ctrPermission)
				});
			},
			actCancel() {
				this.historySearchDetail = false
				this.keyword = '';
				this.actSearch('');
			},
			actSearch(keyword) {
				this.historySearchDetail = false
				if (keyword != "") {
					if (this.searchHistoryList.length >= 10) {
						this.searchHistoryList.length = 9;
					}
					// this.tabPageDetail = true
					if (this.searchHistoryList.includes(keyword)) {
						let i = this.searchHistoryList.indexOf(keyword);
						this.searchHistoryList.splice(i, 1);
						this.searchHistoryList.unshift(keyword)
					} else {
						this.searchHistoryList.unshift(keyword)
						uni.setStorageSync('searchList', JSON.stringify(this.searchHistoryList))
					}
				}
				this.getItemList();
			},
			bbsCancel() {
				this.BBShistorySearchDetail = false
				this.stopseach = 0;
				this.bbscontent = '';
				this.topicIdx = 1;
				this.topicSearchIdx = 1;
				this.getTopicsStatus = true;
				this.getTopicList();
			},
			bbsSearch(keyword) {
				this.stopseach = 0;
				this.topicIdx = 1;
				this.topicSearchIdx = 1;
				this.BBShistorySearchDetail = false
				if (keyword != "") {
					if (this.BBSsearchHistoryList.length >= 10) {
						this.BBSsearchHistoryList.length = 9;
					}
					// this.tabPageDetail = true
					if (this.BBSsearchHistoryList.includes(keyword)) {
						let i = this.BBSsearchHistoryList.indexOf(keyword);
						this.BBSsearchHistoryList.splice(i, 1);
						this.BBSsearchHistoryList.unshift(keyword)
					} else {
						this.BBSsearchHistoryList.unshift(keyword)
						uni.setStorageSync('searchBbsList', JSON.stringify(this.BBSsearchHistoryList))
					}
				}
				// this.getTopicList();
				this.getTopicListSeach();
			},
			actComment(tid) {
				this.isComment = true;
				this.isSend = true;
				this.form = {
					tid: tid,
					Content: ''
				}
				this.getCommonWordsList();
				this.$nextTick(() => {
					this.fileList = this.$refs.uUpload.lists;
					this.friends = []

				})
			},
			//评论的评论
			actComment1(tid, rid) {
				console.log(tid, rid)
				uni.setStorage({
					key: 'replyAds',
					data: this.scrollTopReply
				});
				this.isComment = true;
				this.isSend = true;
				this.form = {
					tid: tid,
					rid: rid,
					Content: ''
				}
				this.getCommonWordsList();
				this.$nextTick(() => {
					this.fileList = this.$refs.uUpload.lists;
					this.friends = []
				})
			},
			scrollTest(e) {
				this.scrollTopReply = e.target.scrollTop
			},
			actEmojiShow() {
				if (this.emojiShow) {
					this.emojiShow = false;
				} else {
					this.emojiShow = true;
				}
			},
			appendMessage(e) {
				if (this.form.Content !== undefined) {
					this.form.Content = this.form.Content.slice(0, this.cursorStart) + e.detail.message + this.form.Content
						.slice(this.cursorStart);
				} else {
					this.$set(this, form, 'Content', e.detail.message)
				}
				this.isSend = false;
			},
			checkCommonWord(e) {
				this.form.Content = e.currentTarget.dataset.words || '';
				this.isCommonTerms = false;
				this.isSend = false;
			},
			showTransfer(topic) {
				this.isTransfer = true;
				this.checkTopic = topic;
			},
			// actTransfer() {
			// 	console.log("this.checkGroupId", this.checkGroupId);
			// 	console.log("topic", this.checkTopic);
			// 	if (this.checkGroupId == 0) {
			// 		uni.showToast({
			// 			title: '请选择群聊',
			// 			icon: 'none',
			// 		})
			// 		return;
			// 	}

			// 	this.sendTextMessageNew(this.checkGroupId.toString(), this.checkTopic);
			// 	// this.sendImageMessage(this.checkGroupId.toString(), this.checkTopic);
			// 	// this.sendVideoMessage(this.checkGroupId.toString(), this.checkTopic);
			// 	uni.showToast({
			// 		title: '转发成功',
			// 	});
			// 	let that = this;
			// 	setTimeout(function() {
			// 		that.isTransfer = false;
			// 	}, 1000)
			// },
			actDeleteReplyShow(topic, rid) {
				this.deleteReplyShow = true;
				console.log(rid)
				this.deleteReplyId = rid;
				this.deleteReplyTopic = topic;
			},
			actDeleteReply() {
				console.log('jinijin -------------------------------------', this.deleteReplyId, this.deleteReplyTopic)
				let that = this;
				if (that.deleteReplyId > 0) {
					that.$http.post('/bbs/topic/reply/delete', {
						tid: that.deleteReplyTopic,
						rid: that.deleteReplyId
					}).then(res => {
						uni.showToast({
							title: this.$t('mine.del_success')
						});
						that.deleteReplyShow = false;
						console.log('删除帖子回复完成删除帖子回复完成--------------------------')
						that.getTopicListNew()
					})
				}
			},
			actKeep(item, isKeep) {
				isKeep = isKeep == 1 ? 0 : 1;
				this.$http.post('/mgr/user/keep/project/item/save', {
					pid: this.project,
					item: item.Iid,
					is_keep: isKeep,
				}).then(res => {
					let title = isKeep == 1 ? '收藏成功' : '操作成功'
					uni.showToast({
						icon: 'none',
						title: title,
					});
					this.getItemList();
				});
			},
			goKeepProjectItem() {
				uni.navigateTo({
					url: '/pages/repair/project_item/index?project=' + this.project + '&type=1'
				});
			},
			commentInput(e) {
				var val = e.detail.value;
				if (val == '') {
					this.isSend = true;
				} else {
					this.isSend = false;
				}
			},
			submit(name) {
				let that = this;
				let imgPack = [];
				let smallImgPack = [];
				let bigImgPack = [];
				this.fileList.forEach(function(item) {
					imgPack.push({
						src: item.response.data.filepath,
					});
				});
				this.previewList.forEach(item => {
					bigImgPack.push({
						src: item.response.data.filepath,
					});
				})
				this.thumbnailList.forEach(function(item) {
					smallImgPack.push({
						src: item.response.data.filepath,
					});
				})

				//解析回复内容拼重新拼接回复内容
				let comment = '';
				let content = that.parseText(that.form.Content);
				for (let i = 0; i < content.length; i++) {
					if (content[i].name == 'img') {
						comment +=
							'<img style="width:20px;height:20px;vertical-align:text-bottom;display:inline-block" src="' +
							content[i].src +
							'"></img>';
					} else if (content[i].name == 'span') {
						comment += content[i].text;
					}
				}
				that.form.Content = comment;

				this.form.ImgPack = JSON.stringify(imgPack);
				this.form.SmallImgPack = JSON.stringify(smallImgPack);
				this.form.BigImgPack = JSON.stringify(bigImgPack)
				this.form.VodSrc = that.VodSrc;
				if (this.friends.length > 0) {
					var friendsAcc = [];
					this.friends.forEach(function(item) {
						friendsAcc.push(item.Friend);
					});
					this.form.FriendAcc = JSON.stringify(friendsAcc);
				}

				that.$http.post('/bbs/topic/reply', that.form).then(res => {
					that.isComment = false;
					that.emojiShow = false;
					that.form = {
						content: ''
					}
					uni.showToast({
						title: '发布成功',
					});
					setTimeout(function() {
						if (name == '动态') {
							//重新获取LIST集合不进行分页
							this.topics = []
							that.getTopicListNew();
						}
						if (name == '合同') {
							that.getContractReply();
						}
					}, 1000)
				})
				// window.location.reload();
			},


			closeVideoPlay() {
				this.isPlay = false;
			},
			radioChange(e) {
				this.chooseStat = e;
			},
			radioGroupChange(e) {
				this.checkGroupId = e;
			},
			checkChange(e) {
				this.chooseProject[e.name] = e;
				if (e.value == false) {
					this.isNext = false;
				}
				this.chooseProject.forEach((item, index) => {
					if (item.value == true) {
						this.isNext = true;
					}
				})
			},
			changeStatSubmit() {
				this.isCheckPopup = false
				var iidArr = [];
				if (this.chooseTypeName == '项目状态') {
					this.resultStat = this.chooseStat;
					this.processStat = this.itemType = this.payType = 0;
				} else if (this.chooseTypeName == '进度状态') {
					this.processStat = this.chooseStat;
					this.resultStat = this.itemType = this.payType = 0;
				} else if (this.chooseTypeName == '工程类型') {
					this.itemType = this.chooseStat;
					this.processStat = this.resultStat = this.payType = 0;
				} else if (this.chooseTypeName == '付款类型') {
					this.payType = this.chooseStat;
					this.resultStat = this.itemType = this.processStat = 0;
				}
				this.chooseProject.forEach((item, index) => {
					if (item.value == true) {
						iidArr.push(this.projectItemList[index].Iid);
					}
				})
				this.$http.post('/client/biz/project/item/stat', {
					iidArr: iidArr,
					resultStat: this.resultStat,
					processStat: this.processStat,
					itemType: this.itemType,
					payType: this.payType
				}).then(res => {
					uni.showToast({
						title: '操作成功',
					});
				})
			},
			actVideoPlay(src) {
				uni.navigateTo({
					url: `/pages/TUIKit/TUIPages/TUIChat/components/message-elements/video-play?videoMessage=${src}`
				})
			},
			fullscreenchange(e) {
				let that = this;
				if (!e.detail.fullScreen) {
					this.isPlay = false;
					this.autoplay = false;
				}
			},
			/*			actPreviewImage(index) {
							let urls = ['/static/images/home/img_02.png'];
							// 预览图片
							uni.previewImage({
								urls: urls,
								current: index,
								indicator: 'default',
								longPressActions: {
									itemList: ['发送给朋友', '保存图片', '收藏'],
									success: function(data) {
										console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
									},
									fail: function(err) {
										console.log(err.errMsg);
									}
								}
							});
						},*/
			delMaterial(mid) {
				this.deleteMaterial = true;
				this.mid = mid;
			},
			cfmMaterial(mid) {
				this.comfirmMaterial = true;
				this.mid = mid;
			},
			actDeleteMaterial(e) {
				this.$http.post('/mgr/biz/materials/delete', {
					mid: this.mid,
				}).then(res => {
					uni.showToast({
						title: '操作成功',
					});
					this.getMaterialList();
				})
			},
			actComfirmMaterial() {
				this.$http.post('/mgr/biz/materials/finish', {
					mid: this.mid
				}).then(res => {
					uni.showToast({
						title: '已完成'
					});
					this.getMaterialList();
				})
			},
			maSubmit() {
				var type = this.maForm.type;
				var desc = this.maForm.desc;
				if (type == '' || type == undefined) {
					uni.showToast({
						title: '请输入设备类型',
						icon: 'none',
						duration: 2000
					});
					return;
				}
				if (desc == '' || type == undefined) {
					uni.showToast({
						title: '请输入设备描述',
						icon: 'none',
						duration: 2000
					});
					return;
				}
				this.$http.post('/mgr/biz/materials/save', {
					Project: this.project,
					Type: type,
					Content: desc
				}).then(res => {
					uni.showToast({
						title: '操作成功'
					});
					this.isAddMaterial = false;
					this.getMaterialList();
				})
			},
			checkedAll(e) {
				if (e.value === true) {
					this.confirmFooterDisplay = true;
					this.confirmList.map((val, index) => {
						val.Checked = true;
						this.confirmArr[index] = {
							value: val.Checked,
							name: index
						};
					})
				} else {
					this.confirmFooterDisplay = false;
					this.confirmList.map((val, index) => {
						val.Checked = false;
						this.confirmArr[index] = {
							value: val.Checked,
							name: index
						};
					})
					this.confirmArr = [];
				}
			},

			confirmChange(e) {
				this.confirmArr[e.name] = e;
				if (e.value == false) {
					this.confirmFooterDisplay = false;
				}
				this.confirmArr.forEach((item, index) => {
					if (item.value == true) {
						this.confirmFooterDisplay = true;
					}
				})
			},
			confirmSubmit(stat) {
				this.confirmFooterDisplay = false;
				var iidArr = [];
				this.confirmArr.forEach((item, index) => {
					if (item.value == true) {
						iidArr.push(this.confirmList[index].Iid);
					}
				});
				if (stat == 2) {
					this.rmkcontent = "";
				}
				this.$http.post('/client/biz/project/item/log/confirm', {
					pid: this.project,
					iids: iidArr,
					stat: stat,
					rmk: this.rmkcontent,
				}).then(res => {
					uni.showToast({
						title: '操作成功',
					});
					this.getConfirmList();
				})
			},
			confirmReject() {
				this.showRemark = true;
				console.log(this.rmkcontent);
			},
			actDel(tid) {
				this.deleteShow = true;
				this.form = {
					tid: tid,
				}
			},
			actCommentDel() {
				let that = this;
				that.$http.post('/bbs/topic/delete', {
					tid: that.form.tid,
					client: 1
				}).then(res => {
					uni.showToast({
						title: '删除成功'
					});
					that.deleteShow = false;
					that.getTopicListNew()
				})
			},
			actPraise(tid, isGood, idx) {
				this.$store.commit('checkUserLogin');
				let that = this;
				if (that.praise) {
					return;
				}
				let data = {
					tid: tid || 0,
				};
				that.praise = true;
				that.$http.post('/bbs/topic/goods/toggle', data).then(res => {
					that.topics[idx].IsGood = res.stat;
					that.topics[idx].Goods = res.goods;
					that.topics[idx].LikeStaffsText = res.likeStaff;

					//更新本地缓存中的数据
					console.log("that.topics[idx].id", that.topics[idx].id)
					if (that.topics[idx].id) {
						homeStorage.update(that.topics[idx].id.split('-')[0] + '-' + that.topics[idx].id.split(
							'-')[1], that.topics[idx]);
					}
					that.praise = false;
				});
			},
			go2User(uid) {
				if (uid > 1) {
					uni.navigateTo({
						url: '/pages/user/index?uid=' + uid
					});
				}
			},
			handleTouchMove(e) {
				if (!this.lock) {
					this.last = e.detail.x;
					this.lock = true;
				}

				if (this.lock && e.detail.x - this.last < -5) {
					this.setData({
						xScale: -75
					});
					setTimeout(() => {
						this.lock = false;
					}, 2000);
				} else if (this.lock && e.detail.x - this.last > 5) {
					this.setData({
						xScale: 0
					});
					setTimeout(() => {
						this.lock = false;
					}, 2000);
				}
			},
			handleImageError(index) {
				this.groupList[index].GroupAvatar = '/static/static/assets/gruopavatar.svg';
			},
			toRoom(groupID, groupName) {
				const conversationID = 'GROUP' + groupID;
				timStore.commit("timStore/setConversationID", conversationID);
				uni.navigateTo({
					url: `../../../TUIKit/TUIPages/TUIChat/index?conversationName=${groupName}`,
				});
				uni.$TUIKit.TUIConversationServer.setMessageRead(conversationID);
				uni.$TUIKit.TUIConversationServer.getConversationProfile(
					conversationID
				).then(res => {
					// 通知 TUIChat 关闭当前会话
					timStore.commit("timStore/setConversation", res.data.conversation);
				});
			},
			copy(value) {
				console.log("复制拉。。。。。。")
				value = value.replace(/<\/?[^>]*>/g, ''); //去除HTML Tag
				value = value.replace(/[|]*\n/, ''); //去除行尾空格
				value = value.replace(/&nbsp;/g, ''); //去掉npsp
				uni.showModal({
					content: value,
					cancelText: '复制',
					confirmText: '取消',
					success: (res) => {
						if (!res.confirm) {
							uni.setClipboardData({
								data: value,
								success: () => {
									uni.showToast({
										title: '复制成功'
									})
								}
							})
						}
					}
				})
			},
			parseText(content) {
				let renderDom = [];
				let temp = content;
				let left = -1;
				let right = -1;

				while (temp !== '') {
					left = temp.indexOf('[');
					right = temp.indexOf(']');

					switch (left) {
						case 0:
							if (right === -1) {
								renderDom.push({
									name: 'span',
									text: temp
								});
								temp = '';
							} else {
								const _emoji = temp.slice(0, right + 1);

								if (emojiMap[_emoji]) {
									renderDom.push({
										name: 'img',
										src: emojiUrl + emojiMap[_emoji]
									});
									temp = temp.substring(right + 1);
								} else {
									renderDom.push({
										name: 'span',
										text: '['
									});
									temp = temp.slice(1);
								}
							}

							break;

						case -1:
							renderDom.push({
								name: 'span',
								text: temp
							});
							temp = '';
							break;

						default:
							renderDom.push({
								name: 'span',
								text: temp.slice(0, left)
							});
							temp = temp.substring(left);
							break;
					}
				}

				return renderDom;
			},
			sendTextMessage(gid, topic) {
				let text = topic.Content || '';
				if (text != '') {
					let body = text;
					if (text.length >= 50) {
						body = text.substring(0, 30) + '...';
					}
					console.log("this.groupDict[gid].GroupName", this.groupDict[gid]);
					let textMessage = this.goEasy.im.createTextMessage({
						text: text,
						to: {
							id: gid,
							type: this.GoEasy.IM_SCENE.GROUP,
							data: {
								name: this.groupDict[gid].GroupName || '',
								avatar: this.groupDict[gid].GroupAvatar != '' ? this.groupDict[gid].GroupAvatar :
									'/static/static/assets/gruopavatar.svg'
							}
						},
						notification: {
							title: this.vuex_user.uname + '发来一段文字',
							body: body
						}
					});
					this.$sendTIMMessage(message);
				}
			},
			sendImageMessage(gid, topic) {
				let images = topic.ImgPackJson || [];
				for (var i = 0; i < images.length; i++) {
					let imageMessage = this.goEasy.im.createImageMessage({
						to: {
							id: gid,
							type: this.GoEasy.IM_SCENE.GROUP,
							data: {
								name: this.groupDict[gid].GroupName || '',
								avatar: this.groupDict[gid].GroupAvatar != '' ? this.groupDict[gid].GroupAvatar :
									'/static/static/assets/gruopavatar.svg'
							}
						},
						file: images[i],
						onProgress: function(progress) {
							console.log(progress)
						},
						notification: {
							title: this.vuex_user.uname + '发来一张图片',
							body: '[图片消息]' // 字段最长 50 字符
						}
					});
					console.log("到这里来了");
					this.$sendTIMMessage(message);
				}
			},
			sendVideoMessage(gid, topic) {
				let videos = topic.VodSrc || '';
				if (videos != '') {
					let videoMessage = this.goEasy.im.createVideoMessage({
						to: {
							id: gid,
							type: this.GoEasy.IM_SCENE.GROUP,
							data: {
								name: this.groupDict[gid].GroupName || '',
								avatar: this.groupDict[gid].GroupAvatar != '' ? this.groupDict[gid].GroupAvatar :
									'/static/static/assets/gruopavatar.svg'
							}
						},
						file: videos,
						onProgress: function(progress) {
							console.log(progress)
						},
						notification: {
							title: this.vuex_user.uname + '发来一个视频',
							body: '[视频消息]' // 字段最长 50 字符
						}
					});
					this.$sendTIMMessage(videoMessage);
				}
			},
			// sendTextMessageNew(gid, topic){		
			// 	let text = topic.Content || '';
			// 	console.log(text)
			// 	if (text != '') {
			// 		  let message = uni.$TUIKit.createTextMessage({
			// 		  to: gid,
			// 		  conversationType: TIM.TYPES.CONV_GROUP,
			// 		  payload: {
			// 		    text: text
			// 		  },
			// 		  // v2.20.0起支持C2C消息已读回执功能，如果您发消息需要已读回执，需购买旗舰版套餐，并且创建消息时将 needReadReceipt 设置为 true
			// 		  needReadReceipt: true
			// 		  // 消息自定义数据（云端保存，会发送到对端，程序卸载重装后还能拉取到，v2.10.2起支持）
			// 		  // cloudCustomData: 'your cloud custom data'
			// 		});
			// 		this.sendMessageTim(message)
			// 	}

			// },
			// sendImageMessageNew(gid, topic){
			// 	let images = topic.ImgPackJson || [];
			// 	  // 1. 创建消息实例，接口返回的实例可以上屏
			// 	   console.log("-------------------------------------------------------------------------")
			// 	 let message = uni.$TUIKit.createImageMessage({

			// 	    to: gid,
			// 	    conversationType: TIM.TYPES.CONV_C2C,
			// 	    payload: {
			// 	      file: images,
			// 	    },
			// 	    onProgress: function(event) { console.log('file uploading:', event) }
			// 	  });

			// 	this.sendMessageTim(message)
			// },
			sendMessageTim(message) {
				console.log(JSON.stringify(message))
				uni.$TUIKit.sendMessage(message).then((res) => {
					console.log(imResponse.data); // 登出成功
				});
			},
			downloadMessageFile(url, messageId, key) {
				let that = this
				console.log("下载消息的图片", url)
				if (url != '' && url.indexOf('http') == 0) {
					uni.downloadFile({
						url: url,
						success: (res) => {
							if (res.statusCode === 200) {
								uni.saveFile({
									tempFilePath: res.tempFilePath,
									success: function(result) {

										console.log("下载好了", result.savedFilePath)
										//更新消息数据
										that.updateSQLiteMessageData(messageId, result
											.savedFilePath, key, table)
									},
								})
							}
						}
					})
				} else if (url != '') {
					uni.saveFile({
						tempFilePath: url,
						success: function(result) {

							console.log("前面的地址", url)
							console.log("下载厚的地址", result.savedFilePath)
							console.log("保存的地址", key)
							//更新消息数据
							that.updateSQLiteMessageData(messageId, result.savedFilePath, key, table)
						},
					})
				}
			},
			insertSQLiteMessageData(insertData) {

				let dbname = this.vuex_user.uid
				let path = '_doc/' + this.vuex_user.uid + '.db'

				//打开数据库
				let isOpen = db.isOpenDB(dbname, path)
				if (isOpen) {
					plus.sqlite.executeSql({
						name: dbname,
						sql: insertData,
						success: (e) => {
							console.log("历史消息新增成功", e);
						},
						fail: (e) => {
							console.log("历史消息新增失败", e);
						}
					})
				}
			},
			updateSQLiteMessageData(messageId, url, key) {

				let dbname = this.vuex_user.uid
				let path = '_doc/' + this.vuex_user.uid + '.db'
				let updateSql = `UPDATE im_conversation_message SET ${key} = "${url}" WHERE message_id = "${messageId}";`

				console.log("updateSql", updateSql)

				//打开数据库
				let isOpen = db.isOpenDB(dbname, path)
				if (isOpen) {
					plus.sqlite.executeSql({
						name: dbname,
						sql: updateSql,
						success: (e) => {
							console.log("消息图片更新成功", e);
						},
						fail: (e) => {
							console.log("消息图片更新失败", e);
						}
					})
				}
			},
			$sendTIMMessage(message) {
				console.log("进来发送了");
				console.log("message", message);

				let that = this
				let messageId = message.messageId
				let senderData = message.senderData || {}
				let video = message.payload.video || {}
				let thumbnail = message.payload.thumbnail || {}
				let payloadUrl = message.payload.url || ''
				let videoUrl = video.url || ''
				let thumbnailUrl = thumbnail.url || ''
				let insertData = []

				let data = {
					'message_id': message.messageId,
					'receiver_id': this.friend.Uid,
					'sender_id': message.senderId,
					'sender_name': senderData.name || '',
					'sender_avatar': senderData.avatar || '',
					'timestamp': message.timestamp,
					'message_type': message.type,
					'message_recalled': message.recalled ? 1 : 0,
					'message_status': message.status,
					'message_read': message.read ? 1 : 0,
					'payload_text': message.payload.text || '',
					'payload_name': message.payload.name || '',
					'payload_content_type': message.payload.contentType || '',
					'payload_url': payloadUrl,
					'payload_duration': message.payload.duration || '',
					'payload_size': message.payload.size || '',
					'payload_width': message.payload.width || '',
					'payload_height': message.payload.height || '',
					'video_name': video.name || '',
					'video_content_type': video.contentType || '',
					'video_url': videoUrl,
					'video_duration': video.duration || '',
					'video_width': video.width || '',
					'video_height': video.height || '',
					'video_size': video.size || '',
					'thumbnail_content_type': thumbnail.contentType || '',
					'thumbnail_url': thumbnailUrl,
					'thumbnail_width': thumbnail.width || '',
					'thumbnail_height': thumbnail.height || '',
					'payload_video_url': message.payload.videoUrl || '',
					'payload_thumbnai_url': message.payload.thumbnailUrl || '',
					'payload_path': message.payload.path || '',
				};
				let keys = Object.keys(data)
				let keyStr = keys.toString()
				let valStr = ''
				for (let key in data) {
					valStr += ('"' + data[key] + '",')
				}
				valStr = valStr.substr(0, valStr.length - 1);
				let sqlStr = `INSERT INTO im_conversation_message(${keyStr}) values(${valStr})`
				insertData.push(sqlStr)

				console.log("发送给的消息啊", data)



				this.goEasy.im.sendMessage({
					message: message,
					onSuccess: function(message) {
						console.log('发送成功.', message);

						that.insertSQLiteMessageData(insertData)
						let thumbnail = message.payload.thumbnail || {}
						console.log("缩略图缩略", thumbnail.url)

						data.thumbnail_url = thumbnail.url


						//下载图片、视频、音频到本地
						that.downloadMessageFile(payloadUrl, messageId, 'payload_url')
						that.downloadMessageFile(videoUrl, messageId, 'video_url')
						that.downloadMessageFile(message.payload.thumbnail.url || '', messageId,
							'thumbnail_url')
						that.downloadMessageFile(senderData.avatar || '', messageId, 'sender_avatar')
					},
					onFailed: function(error) {
						if (error.code === 507) {
							console.log(
								'发送语音/图片/视频/文件失败，没有配置OSS存储，详情参考：https://www.goeasy.io/cn/docs/goeasy-2.x/im/message/media/send-media-message.html'
							);
						} else {
							console.log('发送失败:', error);
						}
					}
				});
			},
			stopTouchMove: function() {
				return false;
			},
			touchStart(e) {
				this.touchStartX = e.touches[0].clientX;
				this.touchStartY = e.touches[0].clientY;
			},
			touchEnd(e) {
				let deltaX = e.changedTouches[0].clientX - this.touchStartX;
				let deltaY = e.changedTouches[0].clientY - this.touchStartY;
				if (Math.abs(deltaX) > 50 && Math.abs(deltaX) > Math.abs(deltaY)) {
					if (deltaX >= 0) {
						let menuList = this.menu.MenuList || [];
						let currentItem = menuList[menuList.length - 1] || [];
						if (currentItem.length == 0) {
							this.isVertical = false;
						} else {
							this.getItemList(currentItem.Prt);
						}
					} else {
						let menuList = this.menu.MenuList || [];
						let currentItem = menuList[menuList.length - 1] || [];
						if (currentItem.length == 0) {
							this.isVertical = false;
						} else {
							this.getItemList(currentItem.Prt);
						}
					}
				}
			},
			//给DIV赋值ID
			step: function(i) {
				return i
			},
			//点击查看图片
			actPreviewImageReply: function(img, idx, ImgPackJson) {
				let index = idx;
				let bigImgJson = []
				if (ImgPackJson && ImgPackJson.length > 0) {
					bigImgJson = ImgPackJson;
				} else {
					bigImgJson = img.imgjson;
				}
				let urls = [];
				bigImgJson.forEach(function(ImgPackJson) {
					urls = urls.concat(ImgPackJson.Src);
				});
				// 预览图片
				uni.previewImage({
					urls: urls,
					current: 0,
					indicator: 'default',
					longPressActions: {
						itemList: ['保存图片'],
						success: function(data) {
							uni.showLoading({
								title: "保存中..."
							})
							setTimeout(function() {
								uni.hideLoading()
							}, 6000);
							uni.downloadFile({
								url: urls, //网络路径，下载下来
								success: (data) => {
									if (data.statusCode === 200) {
										uni.saveImageToPhotosAlbum({
											filePath: data.tempFilePath, //下载后的临时路径
											success: data => { //下载完成后在相册里压根找不到
												uni.hideLoading()
												uni.showToast({
													title: "保存成功！"
												})
											}
										})
									}
								}
							});
						},
						fail: function(err) {
							console.log(err.errMsg);
						}
					}
				});
			},
			goPublish(type) {
				//type值发布合同意见为3,发动态为2
				this.$store.commit('updateAfterPublishPid', this.project)
				this.$goPage('/repair/publish', {
					type: type,
					project: this.project
				}, true)

			},
			//scroll-view刷新用。用来关闭刷新动画
			handleRefresher() {
				var index = this.scrollIndex
				switch (index) {
					case 0:
						this.BBShistorySearchDetail = false
						this.isTriggered = true
						this.getTopicListNew();
						this.getGroupList();
						setTimeout(() => {
							this.isTriggered = false
						}, 1000)
						break;
					case 1:
						break;
					case 2:
						this.isTriggered = true
						this.getShipInfo();
						setTimeout(() => {
							this.isTriggered = false
						}, 1000)
						break;
					case 3:
						this.isTriggered = true
						this.historySearchDetail = false
						this.getPermissionPrice();
						this.getItemList(this.iid);
						this.getMenu();
						setTimeout(() => {
							this.isTriggered = false
						}, 1000)
						break;
					case 4:
						break;
					case 5:
						this.isTriggered = true
						if (this.ctrPermission == 1) {
							this.getContractInfo();
							this.getContractReply();
						} else {
							this.getMaterialList();
						}
						setTimeout(() => {
							this.isTriggered = false
						}, 1000)
						break;
					case 6:
						this.isTriggered = true
						if (this.ctrPermission == 1) {
							this.getMaterialList();
						}
						setTimeout(() => {
							this.isTriggered = false
						}, 1000)
						break;
					case 7:
						break;
				}
				if (index != this.swiperCurrent) {
					this.isComment = false;
					//this.isSend = true;
				} else {
					uni.$on('checkItem', (item) => {
						console.log(item)
						this.isComment = true
						this.isSend = false
					})
				}
				this.swiperCurrent = index;
				this.isAddMaterial = false;
			},
			// 埋点方法  start    开始埋点
			maidianstartfun(index) {
				let pages = getCurrentPages();
				let loadTime = new Date().getTime();
				let route = pages[pages.length - 1].route || '';
				let options = pages[pages.length - 1].$page.options;
				let recordData = this.__recordData;
				this.__loadTime = loadTime;
				this.__currentPage = '/' + route + index;
				recordData = Object.assign({}, recordData, options || {});
				let prandom = getPageRandom([
					genSignNonce(),
					this.__currentPage,
					this.__loadTime
				]);
				// console.log("start   开始埋点的地方",prandom)
				this.lastPrandom = prandom
				sendTraceData({
					url: this.__currentPage,
					lid: prandom,
					act: 'start',
					time: loadTime,
					args: JSON.stringify(recordData),
				});
			},
			maidianleavefun(index) {

				let pages = getCurrentPages();
				let route = pages[pages.length - 1].route || '';
				let options = pages[pages.length - 1].$page.options;
				let recordData = this.__recordData;
				this.__currentPage = '/' + route + index;
				recordData = Object.assign({}, recordData, options || {});
				let leaveTime = new Date().getTime();
				sendTraceData({
					lid: this.lastPrandom,
					act: 'leave',
					time: leaveTime,
					args: JSON.stringify(recordData),
				});
			},
		}
	}
</script>

<style lang="scss" scoped>
	@import "./index.css";

	.w-160 {
		width: 160rpx;
	}

	.mgr-20 {
		margin-right: 20rpx;
	}

	.mgr-30 {
		margin-right: 30rpx;
	}

	.mgt-10 {
		margin-top: 10rpx;
	}

	.detail {
		white-space: normal;
		word-break: break-all;
	}

	.nowrap {
		white-space: nowrap;
	}

	.confirm {
		padding-bottom: 100rpx;

		&-header {
			width: 100%;
			position: absolute;
			left: 0;
			top: 0;
			padding: 20rpx;
			background-color: #fff;

			&_state {
				margin-left: 38rpx;
				font-size: 26rpx;

				.block {
					display: inline-block;
					width: 26rpx;
					height: 26rpx;
					margin-right: 14rpx;
				}
			}

			&_state.gray {
				color: #909399;
				text-decoration: line-through;

				.block {
					background-color: #f4f4f5;
				}
			}

			&_state.red {
				color: #F05459;
				text-decoration: line-through;

				.block {
					background-color: #FDECED;
				}
			}

			&_state.blue {
				color: #409EFF;

				.block {
					background-color: #ecf5ff;
				}
			}

			&_state.green {
				color: #67c23a;

				.block {
					background-color: #e1f3d8;
				}
			}
		}

		&-footer {
			z-index: 99;
			position: fixed;
			width: 100%;
			bottom: 200rpx;
			text-align: center;
			background-color: #FFFFFF;
			display: flex;

			.u-btn {
				display: inline-block;
				margin: 20rpx;
			}
		}
	}

	.detail-repair_item.gray {
		background-color: #F4F4F5;
		text-decoration: line-through;

		.detail-repair_item--order {
			color: #909399;

			&::after {
				border-color: #909399;
			}
		}

		.detail-repair_item--child {
			text-decoration: line-through;
		}
	}

	.detail-repair_item.blue {
		background: #e1ecf9;

		.detail-repair_item--order {
			color: #409EFF;

			&::after {
				border-color: #409EFF;
			}
		}
	}

	.detail-repair_item.red {
		background: rgb(255, 232, 232);

		.detail-repair_item--order {
			color: #EA3B48;

			&::after {
				border-color: #EA3B48;
			}
		}
	}

	.detail-repair_item.green {
		background: #e5f6dc;

		.detail-repair_item--order {
			color: #67C23A;

			&::after {
				border-color: #67C23A;
			}
		}
	}

	.detail {
		height: 100%;
	}

	.detail-tabs {
		width: 100%;
		position: absolute;
		left: 0;
		top: 0;
		background-color: #fff;
	}

	.detail-contnet {
		height: 100%;
		padding-top: 100rpx;

		&_swiper {
			min-height: 100%;
		}
	}

	.detail-header {
		// margin-top: 20rpx;
	}

	.detail-contnet_comment {
		overflow: hidden;
		margin-bottom: 24rpx;
	}

	.article-video {
		position: relative;
		padding-bottom: 30rpx;

		&_item {
			position: relative;
			margin-left: -30rpx;
			width: 100vw;
			// width: 100vw;
			// height: 100vh;
		}

		&_img {
			max-width: 690rpx;
			max-height: 300rpx;
			width: auto;
		}

		&_play {
			width: 62rpx;
			height: 62rpx;
			position: absolute;
			left: 50%;
			top: 50%;
			transform: translate(-50%, -50%);
			border-radius: 5px;
			background: #505050;

			&--icon {
				width: 100%;
				height: 100%;
			}
		}
	}

	.article-item {
		background-color: #fff;
		padding: 30rpx 30rpx 10rpx;

		.article-header {
			height: 85rpx;
			margin-bottom: 24rpx;

			&_avatar {
				margin-right: 26rpx;
			}

			&_name--text {
				font-size: 30rpx;
				color: #494949;
				font-weight: bold;
			}

			&_time {
				color: #999999;
				font-size: 26rpx;
			}

			&_comment {
				font-size: 26rpx;
				color: #0089FF;

				.icon {
					position: relative;
					top: 4rpx;
					font-size: 32rpx;
					margin-right: 6rpx;
				}
			}
		}

		.article-content {
			font-size: 30rpx;
			margin-bottom: 24rpx;
			white-space: normal;
			word-break: break-all;
			word-wrap: break-word;
			word-break: break-word;
		}

		.article-video {
			position: relative;
			padding-bottom: 30rpx;

			&_item {
				position: relative;
				margin-left: -30rpx;
				width: 100vw;
				// width: 100vw;
				// height: 100vh;
			}

			&_img {
				max-width: 690rpx;
				max-height: 300rpx;
				width: auto;
			}

			&_play {
				width: 62rpx;
				height: 62rpx;
				position: absolute;
				left: 50%;
				top: 50%;
				transform: translate(-50%, -50%);
				border-radius: 5px;
				background: #505050;

				&--icon {
					width: 100%;
					height: 100%;
				}
			}
		}

		.article-images {
			clear: both;
			overflow: hidden;
			padding-bottom: 10rpx;

			&_item {
				margin: 10rpx;
				float: left;
			}
		}

		.article-annex {
			color: #0089FF;
			margin-bottom: 20rpx;

			.u-icon {
				margin-right: 6rpx;
			}
		}
	}

	.item-reply-reply-time {
		white-space: nowrap;
		font-size: 24rpx;
		color: #999999;
	}

	.detail-comment {
		padding: 0 32rpx;
		background-color: #fff;
		overflow: hidden;

		&_item {
			padding: 18rpx 0 10rpx;

			.comment-item_avatar {
				margin-right: 12rpx;
			}

			.item-content_header {
				margin-bottom: 20rpx;
			}

			.item-content_header--name {
				font-size: 30rpx;
				color: #494949;
				font-weight: bold;
			}

			.item-content-time {
				font-size: 20rpx;
				color: #b8b8b8;
			}

			.item-content_header--time {
				font-size: 20rpx;
				color: #B0B3B8;
			}

			.item-content_text {
				color: #5D5D5F;
				word-break: break-all;
				word-break: break-word;
				white-space: pre-line;
			}
		}
	}

	.comment-box-reply {
		background-color: #F2F5F9;
		padding: 20rpx 20rpx 20rpx 0;
		margin: 20rpx 0 50rpx;
		margin-left: 80rpx;
	}

	.comment-box {
		padding: 24rpx 24rpx 20rpx;
		background: #F3F3F3;

		.inputStyle {
			padding: 20rpx;
			background: #FFFFFF;
			border: 1rpx solid #EAEAEA;
			border-radius: 8rpx;
		}
	}

	.comBtnStyle {
		margin-top: 14rpx;
		width: 200rpx;
		height: 60rpx;
		line-height: 60rpx;
		font-size: 30rpx;
		color: #FFFFFF;
		background: #2979ff;
		border-color: #2979ff;
		border-radius: 24rpx;
		float: left;
	}

	.btnStyle {
		margin-top: 14rpx;
		width: 118rpx;
		height: 60rpx;
		line-height: 60rpx;
		color: #FFFFFF;
		font-size: 28rpx;
		background: #2979ff;
		border-color: #2979ff;
		float: right;
	}

	.detail-comment_header {
		height: 76rpx;
		background-color: #fff;
	}

	.comment-header_action {
		font-size: 24rpx;
		color: #0089FF;
	}

	.comment-header_title--icon {
		width: 36rpx;
		height: 36rpx;
		margin-right: 6rpx;
	}

	.comment-header_title--label {
		font-size: 30rpx;
		color: #131313;
	}

	.detail-repair_header {
		padding: 30rpx 34rpx;
		background-color: #fff;
		margin-bottom: 20rpx;

		&--name {
			margin-bottom: 20rpx;

			.icon {
				font-size: 30rpx;
				color: #0089FF;
				margin-right: 12rpx;
			}
		}

		&--text {
			font-size: 31rpx;
			// color: #131313;
			color: #0089FF;
		}

		&--price {
			color: #555555;
		}

		&--number {
			// color: #C50909;
			color: black
		}

		&--button {
			height: 50rpx;
			// width: 140rpx;
			padding: 0 10rpx;
			font-size: 28rpx;
			margin-right: 10rpx;
			color: #0089FF;
		}

		.check-btn {
			position: relative;
			top: -3rpx;
			color: #606266;
			font-size: 32rpx;
			width: 56rpx;
			text-align: center;
			height: 56rpx;
			line-height: 54rpx;
			border-radius: 50px;
			border: 1rpx solid #c0c4cc;
		}
	}

	.reject-content {
		margin: 30rpx;
		padding: 20rpx;
		border: 1rpx solid #eeeeee;
		border-radius: 10rpx;
	}

	.reject-content2 {
		margin: 30rpx;
		// padding: 20rpx;
		// border: 1rpx solid #eeeeee;
		// border-radius: 10rpx;
	}

	.reject-content1 {
		// margin: 2rpx,20rpx,2rpx,20rpx;
		margin-top: 2rpx;
		margin-left: 30rpx;
		// padding: 20rpx;
		//border: 1rpx solid #eeeeee;
		//border-radius: 10rpx;
	}

	.mgt-20 {
		margin-top: 20rpx;
	}

	.detail-repair_content {
		overflow: hidden;
		padding-bottom: 100rpx;

		.check-footer {
			z-index: 999;
			position: fixed;
			width: 100%;
			bottom: 0;
			text-align: center;
			background-color: #FFFFFF;

			.u-btn {
				display: inline-block;
				margin: 20rpx;
			}
		}
	}

	.detail-repair_item {
		width: 100%;
		padding: 30rpx 34rpx;
		background-color: #fff;
		margin-bottom: 20rpx;

		&--name {
			color: #000000;
			font-weight: 500;
			margin-bottom: 24rpx;
		}

		&--checkbox {
			margin: 0 9rpx 9rpx 0;
		}

		&--order {
			display: inline-block;
			min-width: 36rpx;
			height: 36rpx;
			line-height: 36rpx;
			margin-bottom: 8rpx;
			padding: 0 6rpx;
			color: #909399;
			font-size: 24rpx;
			text-align: center;

			&::after {
				border-radius: 12rpx;
			}
		}

		&--order_blue {
			width: 36rpx;
			height: 36rpx;
			line-height: 36rpx;
			margin-right: 12rpx;
			color: #409EFF;
			font-size: 24rpx;
			text-align: center;
			background-color: #ECF5FF;

			&::after {
				border-radius: 12rpx;
				border-color: #B3D8FF;
			}
		}

		&--info {
			clear: both;
			overflow: hidden;
		}

		&--price {
			color: #555555;
		}

		&--number {
			color: #C50909;
		}

		&--child {
			float: left;
			width: 50%;
			margin-bottom: 10rpx;
			color: #666666;

			&__value {
				color: #000;
				margin-right: 6rpx;
			}

			&__icon {
				color: #0089FF;
			}
		}

		.child-btn {
			width: inherit;
			float: right;
			display: inline-block;
			padding: 6rpx 12rpx;
			color: #666666;
			background-color: #FFFFFF;
			border-radius: 6rpx;
			// border: 1rpx solid #ddd;
			border: 1rpx solid #006EFF;

			&_count {
				color: #131313;
				margin-left: 10rpx;
			}
		}

		&--child:nth-child(2n) {
			text-align: right;
		}

		&--child.textarea {
			width: 100%;
		}

		&--footer {
			margin-top: 20rpx;
			padding-top: 20rpx;
			text-align: right;

			.u-btn {
				margin-left: 20rpx;
			}
		}
	}

	.detail-contract_header {
		padding: 36rpx;
		background-color: #fff;
		margin-bottom: 20rpx;

		&--name {
			font-size: 32rpx;
			margin-bottom: 20rpx;

			.icon {
				font-size: 36rpx;
				color: #fff;
				margin-right: 12rpx;
				padding: 4rpx;
				background: linear-gradient(0deg, #0089FF 0%, #349DF8 100%);
				background-color: #0089FF;
				border-radius: 30px;
			}
		}

		.repair-item_cell {
			+.repair-item_cell {
				margin-top: 24rpx;
			}

			&--label {
				color: #666666;
			}

			&--value {
				color: #000000;
			}
		}
	}

	.detail-contract_content {
		overflow: hidden;

		.detail-comment_header {
			height: 88rpx;
			padding: 0 27rpx;
		}

		.article-item {
			margin-bottom: 24rpx;
		}
	}

	.detail-contract_attrs {
		margin: 30rpx auto;
		padding: 30rpx;
		border-radius: 10rpx;
		background-color: #edf5fc;
	}

	.fixed-publish {
		z-index: 9999;
		position: fixed;
		right: 4rpx;
		bottom: 200rpx;
	}

	.project-header {
		&_item {
			margin: 0 16rpx 16rpx 0;

			.icon {
				color: #0089FF;
				margin: 0 6rpx;
			}
		}

		&_item.current {
			display: inline-block;
			padding: 0 18rpx;
			color: #0089FF;
			line-height: 1.6;
			// background: #E9F4FE;
			border-radius: 4rpx;
		}

		&_item.hidden {
			overflow: hidden;
			word-break: break-all;
			text-overflow: ellipsis;
			display: -webkit-box;
			-webkit-box-orient: vertical;
			-webkit-line-clamp: 2;
		}
	}

	.empty-cnt {
		background-color: #fff;

		.u-empty {
			padding: 100rpx 0;
		}
	}

	.detail-repair_group {
		display: block;

		.tag {
			margin-left: 8rpx;
			padding: 2rpx 8rpx;
			font-size: 24rpx;
			color: #FFFFFF;
			background-color: #c9d8e8;
			border-radius: 4rpx;
		}
	}

	.mgb-10 {
		margin-bottom: 10rpx;
	}

	.search-header {
		background-color: #fff;
		padding: 30rpx;
		margin-bottom: 20rpx;
	}

	.search-content {
		overflow: hidden;
	}

	.like-staffs {
		font-size: 30rpx;
		font-family: sans-serif;
		color: #515b7c;
		background-color: #F5F5F5;
		white-space: normal;
		word-break: break-all;
		word-wrap: break-word;
		word-break: break-word;
	}

	.check-box {
		width: 600rpx;
		padding: 40rpx;
	}

	.check-title {
		font-size: 32rpx;
		margin-bottom: 20rpx;
	}

	.check-item {
		width: 100%;
		background-color: #fff;
		height: 106rpx;
		padding: 0 24rpx 0 18rpx;
	}

	.publish {
		padding-bottom: 100rpx;
		min-height: 100vh;
		background-color: #fff;

		&-input {
			padding: 30rpx;
			width: 100%;
		}
	}

	.publish-images {
		padding: 0 30rpx;
		margin-bottom: 30rpx;
		clear: both;
		overflow: hidden;

		&_item {
			position: relative;
			margin: 10rpx;
			float: left;

			.u-icon {
				z-index: 999;
				position: absolute;
				top: 6rpx;
				right: 6rpx;
				background-color: #FFFFFF;
				border-radius: 42px;
			}
		}
	}

	.publish-friends {
		padding: 0 30rpx;

		&_item {
			font-size: 28rpx;
			color: #0073DB;
		}
	}

	.uploader_video {
		position: relative;
		width: 118rpx;
		height: 118rpx;
		border-radius: 10rpx;
		overflow: hidden;

		.close-icon {
			z-index: 99999;
			position: absolute;
			top: 4rpx;
			right: 4rpx;

			.u-icon {
				background: #FFFFFF;
				border-radius: 100%;
			}
		}

		&_play--icon {
			width: 36rpx;
			height: 36rpx;
			z-index: 999;
			position: absolute;
			left: 50%;
			top: 50%;
			transform: translate(-50%, -50%);
			border-radius: 5px;
			background: #505050;
		}
	}

	.publish-handle {
		z-index: 999;
		width: 100%;
		position: fixed;
		left: 0;
		bottom: 0;
		background-color: #f1f1f1;

		&_content {
			padding: 20rpx 30rpx;
		}

		&_left {
			font-size: 48rpx;
			color: #777777;

			&--item {
				padding: 0 16rpx;
			}

			.icon {
				font-size: 48rpx;
				// margin-right: 20rpx;
			}
		}

		&_right {
			color: #999999;
		}
	}

	.video {
		z-index: 9;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}

	.rich-val {
		word-break: break-all;
		word-break: break-word;
		white-space: pre-line;

	}

	.search_input {
		margin-top: 20rpx;
	}

	.history {
		margin-top: 20rpx;
		background-color: #fff;
		padding: 20rpx 10rpx;
	}

	.history_text {
		margin-left: 10rpx;
		font-size: 30rpx;
	}

	.history_viewContent {
		width: 100%;
		flex-wrap: wrap;
		display: flex;
		padding: 10rpx 20rpx;
	}

	.history_view {
		background-color: #fff;
		padding: 4rpx 20rpx;
		margin-right: 20rpx;
		border: 1px solid #f1f1f1;
		border-radius: 30rpx;
		text-align: center;
		font-size: 28rpx;
	}

	.fire_text {
		margin-left: 10rpx;
		font-size: 12px;
	}

	.fire_search {
		margin-top: 20rpx;
	}

	.fire_viewContent {
		width: 100%;
		flex-wrap: wrap;
		justify-content: space-between;
		display: flex;
		padding: 0 40rpx;
	}

	.fire_view {
		background-color: #E2E0E0;
		padding: 4rpx 20rpx 4rpx 20rpx;
		margin-top: 20rpx;
		min-width: 200rpx;
		flex-shrink: 0;
		border: 1px solid grey;
		border-radius: 15rpx;
		text-align: center;
	}

	.fire_viewContent:after {
		content: '';
		width: 30%;
	}

	.history_hr {
		width: 95%;
		margin-top: 40rpx;
		// text-align: center;
		height: 300rpx;
		padding-left: 10rpx;
		padding-right: 10rpx;
		// overflow:hidden;
		border-radius: 20rpx;
		border: 1px solid grey;
		margin-left: auto;
		margin-right: auto;
	}

	.h_content {
		margin-top: 20rpx;
	}

	// 这里是hr人事的
	.h_title {
		margin-left: 20rpx;
	}

	.h_view_wrap {
		display: flex;
		text-align: center;
		width: 100%;
		flex-wrap: wrap;
		justify-content: space-between;
		float: left;
	}

	.h_view {
		border: 1px solid grey;
		margin-top: 20rpx;
		min-width: 200rpx;
		border-radius: 20rpx;
		padding: 4rpx 20rpx 4rpx 20rpx;
	}

	.shareBtn {
		border-radius: 10rpx;
		padding: 10rpx;
		position: fixed;
		left: 50%;
		transform: translateX(-50%);
		bottom: 0;
	}

	.tabPage {
		width: 100%;
		margin-top: 20rpx;
	}
</style>